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 · 5 comments
Open

Add 400 Bad Request-like status code #269

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

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

@cthulhu-rider
Copy link
Contributor Author

although "400" will cover a lot of cases, we can add also more codes within this issue. Like contract ones (NNS, etc.)

@cthulhu-rider
Copy link
Contributor Author

server-side streams, which are object GET/RANGE/SEARCH, may break of due when communication with subsequent node fails. There is no code for this now, the server is forced to return INTERNAL

we can add UNAVAILABLE similar to the gRPC one. Note that verbally ABORTED looks closer, but iiuc it's about other cases. Note that we aint obliged to completely follow the gRPC naming

client profit:

  • he can perform retries that should not be done on INTERNAL
  • for GET/RANGE he can even continue: call RANGE for the remaining payload

@cthulhu-rider
Copy link
Contributor Author

boost this issue ⬆️
and all the related ones

@roman-khimov roman-khimov added this to the v2.17.0 milestone Dec 27, 2024
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