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
Showing only changes of commit 8412b075a5 - Show all commits

View file

@ -599,7 +599,7 @@ func handleError(msg string, err error) error {
} }
if strings.Contains(err.Error(), "not found") { if strings.Contains(err.Error(), "not found") {
return fmt.Errorf("%w: %s", ErrNodeNotFound, err.Error()) 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("%w: %s", ErrNodeAccessDenied, err.Error())
} }
return fmt.Errorf("%s: %w", msg, err) return fmt.Errorf("%s: %w", msg, err)