mirror of
https://github.com/nspcc-dev/neofs-sdk-go.git
synced 2026-03-01 04:29:18 +00:00
Facilitate support for new statuses #131
Labels
No labels
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U2
U2
U3
U4
blocked
bug
client
config
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
pool
question
security
task
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-sdk-go#131
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 @cthulhu-rider on GitHub (Sep 19, 2022).
All status reponses of NeoFS API protocol are placed in
client/apistatuspackage. In order to support new status, we need to define new type which provideserrorinterface,ToStatusV2and custom payload methods (what exactly status carries).In order to support returning new status type from the
client.Clientwe need to also support this status inapistatus.FromStatusV2function. This fact is not obvious and is not controlled in any way at the compilation stage, so it is easy to come to a situation where the client will decode statuses with these codes into an unrecognized error.I suggest to think how to make it as easy as possible to support the new status in automatic mode, or at least lead to a compilation error if
FromStatusV2is forgotten. No exact proposal for now, just a thought.