Skip to content
This repository was archived by the owner on Oct 17, 2020. It is now read-only.
This repository was archived by the owner on Oct 17, 2020. It is now read-only.

[Refactor] Add custom error type for failed auto alias #950

@Coteh

Description

@Coteh

What is frustrating you?
In CreateShortLink, if auto alias generation fails, error is thrown to API consumer. This can expose more details than necessary to API caller and could risk API being attacked by hackers.

Your solution
Add a new error type to use case layer that signifies to API caller that short link creation failed due to error generating alias, without revealing any information from the implementation of auto alias generation. Throw this new error type in use case layer when auto alias fails.

Alternatives considered
Throw error as-is from use case layer and let the GraphQL resolver create a new error type for auto alias fail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions