status: Introduce new common status code #49

Merged
fyrchik merged 1 commit from aarifullin/frostfs-api:feat/invalidarg_status into master 2024-06-17 15:30:10 +00:00
Member
  • Introduce INVALID_ARGUMENT for common status section;
  • Regenerate docs.
* Introduce `INVALID_ARGUMENT` for common status section; * Regenerate docs.
aarifullin force-pushed feat/invalidarg_status from 3ca61be249 to 144d15bef4 2024-05-13 13:50:00 +00:00 Compare
aarifullin requested review from storage-core-committers 2024-05-13 13:50:23 +00:00
aarifullin requested review from storage-core-developers 2024-05-13 13:50:30 +00:00
aarifullin requested review from realloc 2024-05-13 13:50:46 +00:00
Owner

Do we need this for anything specific, or is it just QOL change?

Do we _need_ this for anything specific, or is it just QOL change?
acid-ant approved these changes 2024-05-14 05:57:43 +00:00
Author
Member

Do we need this for anything specific

I encountered an issue when I was implementing apemanager service in frostfs-node: for me it looked awkard that errors like "invalid CID", "invalid namespace", "empty public key" are returned with Server internal 1024 status code. We know that 1024 is the default status code, it is the sunk for all homeless errors. I think we can improve status code recognition for a client and make him fix a request before its next sending

> Do we _need_ this for anything specific I encountered an issue when I was implementing `apemanager` service in `frostfs-node`: for me it looked awkard that errors like `"invalid CID"`, `"invalid namespace"`, `"empty public key"` are returned with `Server internal 1024` status code. We know that `1024` is the default status code, it is the sunk for all *homeless* errors. I think we can improve status code recognition for a client and make him fix a request before its next sending
Owner

Need approve from @alexvanin @realloc

Need approve from @alexvanin @realloc
fyrchik approved these changes 2024-05-14 07:41:33 +00:00
alexvanin approved these changes 2024-06-17 09:36:42 +00:00
alexvanin left a comment
Owner

Awesome. "Invalid argument" is pretty common return code used in HTTP, gRPC and many more protocols, so it is natural to see it there too.

Awesome. "Invalid argument" is pretty common return code used in [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400), [gRPC](https://grpc.io/docs/guides/status-codes/) and many more protocols, so it is natural to see it there too.
fyrchik approved these changes 2024-06-17 15:29:58 +00:00
fyrchik merged commit 0916cb5398 into master 2024-06-17 15:30:10 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-api#49
No description provided.