-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define error messages as exportable constants #241
Comments
It's a good idea. Since the error message variables may be the same, let's include the namespace with it. such as: catch(e) {
if(e.message === SD_JWT_ERROR.STATUS_NOT_VALID)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes we need to find out which error was thrown. To avoid a break of our application when we change the string of the error message, we should use constants that we use for throwing an error and that can be used by a developper for checking it like
The text was updated successfully, but these errors were encountered: