pool: Fix handlerError panic for objectPatch #251

Merged
fyrchik merged 1 commit from aarifullin/frostfs-sdk-go:fix/patch/2 into master 2024-08-13 12:32:23 +00:00

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)
}