forked from TrueCloudLab/frostfs-node
[#1340] getSvc: Fix access denied error handling
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6488ddee88
commit
7abbdca064
3 changed files with 29 additions and 12 deletions
|
@ -31,6 +31,7 @@ func (r *request) processNode(ctx context.Context, info client.NodeInfo) bool {
|
|||
var errECInfo *objectSDK.ECInfoError
|
||||
var errRemoved *apistatus.ObjectAlreadyRemoved
|
||||
var errOutOfRange *apistatus.ObjectOutOfRange
|
||||
var errAccessDenied *apistatus.ObjectAccessDenied
|
||||
|
||||
switch {
|
||||
default:
|
||||
|
@ -38,7 +39,11 @@ func (r *request) processNode(ctx context.Context, info client.NodeInfo) bool {
|
|||
if r.status != statusEC {
|
||||
// for raw requests, continue to collect other parts
|
||||
r.status = statusUndefined
|
||||
r.err = new(apistatus.ObjectNotFound)
|
||||
if errors.As(err, &errAccessDenied) {
|
||||
r.err = err
|
||||
} else {
|
||||
r.err = new(apistatus.ObjectNotFound)
|
||||
}
|
||||
}
|
||||
return false
|
||||
case err == nil:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue