[#226] pool/tree: Fix handling access denied error
Tests and linters / Tests (1.21) (pull_request) Successful in 1m18s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m26s Details
Tests and linters / Lint (pull_request) Successful in 2m18s Details
DCO / DCO (pull_request) Successful in 46s Details

(cherry picked from commit 6a52487edd)

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
support/v1.0.0-rc.4
Denis Kirillov 2024-05-30 14:58:14 +03:00 committed by Alex Vanin
parent e5040d35e9
commit 8412b075a5
1 changed files with 1 additions and 1 deletions

View File

@ -599,7 +599,7 @@ func handleError(msg string, err error) error {
}
if strings.Contains(err.Error(), "not found") {
return fmt.Errorf("%w: %s", ErrNodeNotFound, err.Error())
} else if strings.Contains(err.Error(), "is denied by") {
} else if strings.Contains(err.Error(), "denied") {
return fmt.Errorf("%w: %s", ErrNodeAccessDenied, err.Error())
}
return fmt.Errorf("%s: %w", msg, err)