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
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 ]
}
The text was updated successfully, but these errors were encountered:
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
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 ]
}
The text was updated successfully, but these errors were encountered: