Port fix handling access denied error in pool #229

Merged
alexvanin merged 1 commit from alexvanin/frostfs-sdk-go:port/226 into support/v1.0.0-rc.4 2024-06-20 14:38:41 +00:00

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)