-
Notifications
You must be signed in to change notification settings - Fork 38
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
Handle client errors according to NeoFS SDK RC-9 #2468
Handle client errors according to NeoFS SDK RC-9 #2468
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2468 +/- ##
=======================================
Coverage 29.38% 29.38%
=======================================
Files 399 399
Lines 30385 30381 -4
=======================================
- Hits 8928 8927 -1
+ Misses 20714 20711 -3
Partials 743 743
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Code looks OK, but there are some problems with tests and CHANGELOG. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group_test.go:19:
Error Trace: /home/runner/work/neofs-node/neofs-node/pkg/morph/deploy/group_test.go:19
Error: Received unexpected error:
create AES cipher block: crypto/aes: invalid key size 31
Test: TestKeySharing
Wow.
internalErr = new(sdkstatus.ServerInternal) | ||
accessErr = new(sdkstatus.ObjectAccessDenied) | ||
) | ||
var code int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single var
-> multi var
does not relate to this commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really think deserves separate commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, ofc, no. but do we need to have 6 line change if it may be 1-line removal (related to any style changes)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gofmt will change other line and var group will become obsolete. I don't mind to not remove braces, but imo code became more laconic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, up to you. just wanted to highlight that i spent some time looking at changes and see what exactly was removed and what just moved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sry bout that mate
6cedb25
to
5ca249a
Compare
Currently used SDK revision changed/improved docs and UX of error handling. Storage node missed these changes on SDK upgrade, so we have to adjust to them. Use `errors.Is` when exact error structure is not needed. Actualize docs of errors returned by internal client. Fixes nspcc-dev#2465. Signed-off-by: Leonard Lyubich <[email protected]>
5ca249a
to
0bf3829
Compare
We don't have to use `errors.As` to just check error type now, `errors.Is` is more appropriate for this. Signed-off-by: Leonard Lyubich <[email protected]>
0bf3829
to
5387290
Compare
No description provided.