From cf9a54dcda81b51263f7600a028abbdd816f8302 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Thu, 19 Jan 2023 15:04:21 +0300 Subject: [PATCH] [TrueCloudLab#11] pool: Fix handling SplitInfoError Signed-off-by: Denis Kirillov --- pool/pool.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pool/pool.go b/pool/pool.go index cf7a01b..012b095 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -995,7 +995,14 @@ func (c *clientWrapper) incRequests(elapsed time.Duration, method MethodIndex) { func (c *clientStatusMonitor) handleError(st apistatus.Status, err error) error { if err != nil { - c.incErrorRate() + // non-status logic error that could be returned + // from the SDK client; should not be considered + // as a connection error + var siErr *object.SplitInfoError + if !errors.As(err, &siErr) { + c.incErrorRate() + } + return err }