[#1340] getSvc: Fix access denied error handling
All checks were successful
DCO action / DCO (pull_request) Successful in 4m23s
Tests and linters / Run gofumpt (pull_request) Successful in 4m14s
Vulncheck / Vulncheck (pull_request) Successful in 4m33s
Build / Build Components (1.22) (pull_request) Successful in 4m56s
Build / Build Components (1.23) (pull_request) Successful in 4m59s
Tests and linters / Tests (1.22) (pull_request) Successful in 5m2s
Pre-commit hooks / Pre-commit (pull_request) Successful in 5m6s
Tests and linters / Tests (1.23) (pull_request) Successful in 5m8s
Tests and linters / Lint (pull_request) Successful in 5m51s
Tests and linters / gopls check (pull_request) Successful in 6m13s
Tests and linters / Tests with -race (pull_request) Successful in 6m19s
Tests and linters / Staticcheck (pull_request) Successful in 1m48s
All checks were successful
DCO action / DCO (pull_request) Successful in 4m23s
Tests and linters / Run gofumpt (pull_request) Successful in 4m14s
Vulncheck / Vulncheck (pull_request) Successful in 4m33s
Build / Build Components (1.22) (pull_request) Successful in 4m56s
Build / Build Components (1.23) (pull_request) Successful in 4m59s
Tests and linters / Tests (1.22) (pull_request) Successful in 5m2s
Pre-commit hooks / Pre-commit (pull_request) Successful in 5m6s
Tests and linters / Tests (1.23) (pull_request) Successful in 5m8s
Tests and linters / Lint (pull_request) Successful in 5m51s
Tests and linters / gopls check (pull_request) Successful in 6m13s
Tests and linters / Tests with -race (pull_request) Successful in 6m19s
Tests and linters / Staticcheck (pull_request) Successful in 1m48s
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