mirror of
https://github.com/nspcc-dev/neofs-node.git
synced 2026-03-01 04:29:10 +00:00
Reconsider status responses #1188
Labels
No labels
I1
I2
I3
I4
S0
S1
S2
S3
S4
U0
U1
U2
U3
U4
blocked
bug
config
dependencies
discussion
documentation
enhancement
enhancement
epic
feature
go
good first issue
help wanted
neofs-adm
neofs-cli
neofs-cli
neofs-cli
neofs-ir
neofs-lens
neofs-storage
neofs-storage
performance
question
security
task
test
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-node#1188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @carpawell on GitHub (Feb 21, 2024).
Some status errors in NeoFS are known and self-describing. But there are also "general errors" with 1024 status codes and some "good" human-readable messages.
Expected Behavior
If I have a general error, I expect NOT a general message that can help me understand what is happening. E.g. session token does not relate to the container a request is trying to change:
Current Behavior
Only the last error in the errors chain is attached:
Possible Solution
Unwrapdoes not unwrap more than it is needed as the package thinks)Steps to Reproduce (for bugs)
Any 1024 "general" error case (like incorrect session token; even though session token error may become another status case, there always be some "general" errors that should be described correctly).
Context
nspcc-dev/neofs-node@996b1eae7b/pkg/services/util/sign.go (L225-L229)Regression
No.
Your Environment
0.40.0
@roman-khimov commented on GitHub (Feb 21, 2024):
Server should return as much data as it can (except when it somehow affects security), simple as that. Joining/chaining errors is fine for that and the protocol allows for it,
messagecan be anything. Then this message should be a part of client error.@carpawell commented on GitHub (Feb 21, 2024):
@roman-khimov, so you are for the full error message?
@roman-khimov commented on GitHub (Feb 21, 2024):
Absolutely. It's not that much different from https://github.com/neo-project/proposals/pull/156
@carpawell commented on GitHub (Feb 21, 2024):
Well, I agree too, I think. I just try to understand why it was done like that. I think the idea was that "a user do not want to see
Invalid table argument to Dexie.transaction(). Only Table or String are allowed [Caught in: [MWPTransactor] Error performing loadExpired transaction]" (nicely copied from the browser's console) errors in the response. Maybe.@roman-khimov commented on GitHub (May 7, 2024):
1024 in
ContainerDelete delete: status: code = 1024 message = session was not issued by the container owner, issuer: NehJedoS24C7LkeJCzSFpApivRmHKJe1Q6is rather strange. 2048 is almost perfect except it's defined for object operations.@cthulhu-rider commented on GitHub (Dec 26, 2024):
big 👍 to this proposal
pretty simple approach comes to my mind:
2048w/o details, CLI just types:or, if status has detail:
and no other info. See next
3. with
-v, command also prints as now:i.e. code + all details + full text message
4. for
1024, it makes sense to always print full message:and with
-vfinally, user faces no transport/proto details and strange colon-separated texts in widely-known cases like
Not foundorFobiddenunless-vwill also help with https://github.com/nspcc-dev/neofs-testcases/issues/919
i faced in tests:
this is what becomes when unwrapping is dropped. Realized 2 facts:
combining proposed default simplification and
-vwill help to everybody@cthulhu-rider commented on GitHub (Jul 15, 2025):
when PUT server accepts LINK object and verifies its content, it may not found some split member. Here what we get:
getting 404 to PUT is confusing. I checked original server error