[#251] pool: Fix handlerError panic for objectPatch
All checks were successful
DCO / DCO (pull_request) Successful in 55s
Tests and linters / Tests (1.21) (pull_request) Successful in 1m0s
Tests and linters / Tests (1.22) (pull_request) Successful in 1m0s
Tests and linters / Lint (pull_request) Successful in 1m56s

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-08-13 15:27:42 +03:00
parent 2077b35736
commit 908c96a94d

View file

@ -760,7 +760,11 @@ func (c *clientWrapper) objectPatch(ctx context.Context, prm PrmObjectPatch) (Re
}
res, err := pObj.Close(ctx)
if err = c.handleError(ctx, res.Status(), err); err != nil {
var st apistatus.Status
if res != nil {
st = res.Status()
}
if err = c.handleError(ctx, st, err); err != nil {
return ResPatchObject{}, fmt.Errorf("client failure: %w", err)
}