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

bad_request should also return an error code #1383

Open
jerryfletcher21 opened this issue Jul 13, 2024 · 0 comments
Open

bad_request should also return an error code #1383

jerryfletcher21 opened this issue Jul 13, 2024 · 0 comments

Comments

@jerryfletcher21
Copy link
Contributor

Describe the bug
Every requests made that fails is returned a json response with a string field bad_request specifying the error.
For a client that needs to handle the failed requests it is not comfortable working with these strings.
It also can happen in the backend to change the string of a particular error, and if the client is checking for the previous string it will not catch it.

Expected behavior
Every bad_request should also include an int like error_code, for example like this:

{
    "error_code": 10,
    "bad_request": "The PGP signed cleartext message is not valid."
}
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