From 8412b075a5be3a7114498b6354f57a43dc7e0d4f Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Thu, 30 May 2024 14:58:14 +0300 Subject: [PATCH] [#226] pool/tree: Fix handling access denied error (cherry picked from commit 6a52487edd8d2d5f485e3e375b512a5e554470c4) Signed-off-by: Denis Kirillov Signed-off-by: Alex Vanin --- pool/tree/pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pool/tree/pool.go b/pool/tree/pool.go index 28cc98b..2c55351 100644 --- a/pool/tree/pool.go +++ b/pool/tree/pool.go @@ -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) -- 2.40.1