Skip to content
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

Improve errors: Create internal error codes uniquely describing what the error is #143

Open
sgerodes opened this issue Jul 11, 2022 · 0 comments

Comments

@sgerodes
Copy link
Contributor

It is tedious to automate error handling.
My proposition is to create error codes (NOT http codes) that will precisely describe what happened. In addition to the existing error messages.
All codes should be uniquely assigned to specific errors. Once created codes should not change, for backward compatibility. Better add new.

Examples:

e.g, 25 is 'API keys are no longer valid or incorrect'
{
"msg": "Other error occurred: record_invalid Invalid parameters {'api_key': ['API keys are no longer valid or incorrect. If you have just created this key, please wait 30 seconds and try again.']}.",
"internal_error_codes": [ 25 ]
}

Multiple error occured:
{
"msg": "....",
"internal_error_codes": [ 67, 21, 2 ]
}

@sgerodes sgerodes changed the title Create internal error codes describing what the error is Improve errors: Create internal error codes uniquely describing what the error is Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant