Define a standard way about how to forward errors to the user #8762
jonasraoni
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Source: #8724
Introduction
The system is composed by unexpected errors/exceptions, which are normally unhelpful (permission denied, out of disk space, etc.) or unsafe (any unnecessary exposure of backend details such as internal paths, credentials, etc.) to be shared directly with the end user.
There are also business logic exceptions, which are expected and safe to forward (e.g. only admins are allowed to delete).
Problem
At this moment we don't have a standard way to achieve that, so whenever it's needed, someone comes up with his own ideas.
Requirements/Ideas
throw new UserException('Your login has been disabled')
)Other References
Beta Was this translation helpful? Give feedback.
All reactions