[#1297] getSvc: Return AccessDenied instead of ObjectNotFound
Do not replace the access denied error if it was received earlier. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
0b87be804a
commit
73b112a517
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ func (r *request) processNode(ctx context.Context, info client.NodeInfo) bool {
|
|||
r.status = statusUndefined
|
||||
if errors.As(err, &errAccessDenied) {
|
||||
r.err = err
|
||||
} else {
|
||||
} else if r.err == nil || !errors.As(r.err, &errAccessDenied) {
|
||||
r.err = new(apistatus.ObjectNotFound)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue