Skip to content

bad_request should also return an error code #1383

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

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

bad_request should also return an error code #1383

jerryfletcher21 opened this issue Jul 13, 2024 · 6 comments
Assignees
Labels
enhancement 🆙 New feature or request python Pull requests that update Python code

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."
}
@KoalaSat KoalaSat added enhancement 🆙 New feature or request python Pull requests that update Python code labels Feb 18, 2025
@Sansh2356
Copy link

is this issue resolved @jerryfletcher21 and @KoalaSat ?

@hexlorn
Copy link
Contributor

hexlorn commented Apr 9, 2025

@KoalaSat I can work in this issue if you like

@KoalaSat
Copy link
Member

Ey @hexlorn that ks for pinging, it seems I missed @Sansh2356 's request. Let's wait for an answer, if not I'll assign it to you

@Sansh2356
Copy link

Sansh2356 commented Apr 10, 2025

Ey @hexlorn that ks for pinging, it seems I missed @Sansh2356 's request. Let's wait for an answer, if not I'll assign it to you

@KoalaSat you can assign it to @hexlorn i won't be able to do due to some health issue as of now.

@KoalaSat
Copy link
Member

Assigned to you @hexlorn thank you

@hexlorn
Copy link
Contributor

hexlorn commented Apr 15, 2025

@Sansh2356 I hope you get well soon 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🆙 New feature or request python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

4 participants