-
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
BasicACLErr and eACLErr errors are created incorrectly #2465
Comments
I think we can still check our |
Sorry, I didn't get the point. The client code invokes PayloadRange that gets a response from server side. And server returns wrapped |
@Ayrtat i mean this calls client method and it must handle client's claimed return no matter what the server returns as @roman-khimov said, we just inaccurately updated to a NeoFS SDK RC-9 that changed the documentation of returned errors: actual instead of previous i suppose there may be other problem cases related to status error handling, lets resolve all of them in this issue |
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 <leonard@morphbits.io>
Expected Behavior
An error created by the method basicACLErr or eACLErr must be able to be casted to
Current Behavior
It seems
getObject
method for object service works incorrectly here because the castingerrors.As(err, &errAccessDenied)
doesn't work outPossible Solution
https://github.com/nspcc-dev/neofs-node/blob/master/pkg/services/object/acl/v2/errors.go#L28
https://github.com/nspcc-dev/neofs-node/blob/master/pkg/services/object/acl/v2/errors.go#L35
var errAccessDenied apistatus.ObjectAccessDenied
should be replaced witherrAccessDenied := &apistatus.ObjectAccessDenied{}
Steps to Reproduce (for bugs)
You can check it with unit-test
The text was updated successfully, but these errors were encountered: