You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
magicoder10
changed the title
[Refactor] Consider adding custom error type for failed auto alias
[Refactor] Add custom error type for failed auto alias
Jul 24, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: