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

Add 400 Bad Request-like status code #269

Open
cthulhu-rider opened this issue Aug 9, 2023 · 2 comments
Open

Add 400 Bad Request-like status code #269

cthulhu-rider opened this issue Aug 9, 2023 · 2 comments
Labels
enhancement Improving existing functionality I2 Regular impact S2 Regular significance U4 Nothing urgent

Comments

@cthulhu-rider
Copy link
Contributor

example:

status: code = 1024 message = malformed request: invalid session token owner

i propose to extend

enum CommonFail {
enum with BAD_REQUEST value. The status will be returned to any request with incorrect format. It will allow to distinguish such failures from real internal server errors

@carpawell
Copy link
Member

@cthulhu-rider, do you distinguish:

  1. Completely strange request (missing required fields, or container/object ID is longer than 32 bytes, etc)
  2. Logically incorrect: your example (it is a correct request but its owner must not be treated that way)?

Or they both should be 400ed the same way?

To me 1. is about "you made a mistake in your client implementation" while 2. is about "your admin made a mistake when providing a path to a wallet". I like details but think that for the most cases it does not matter.

@cthulhu-rider
Copy link
Contributor Author

@carpawell IIUC ur example is about diff b/w 400 and 401/403. These are completely diff cases for sure

original example may mean both cases. I propose to clarify for better system responsiveness

i mean 400 bout incorrect fields' format or message sequences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I2 Regular impact S2 Regular significance U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

3 participants