diff --git a/client/apemanager_list_chains.go b/client/apemanager_list_chains.go index a608f1e..a8a3e8a 100644 --- a/client/apemanager_list_chains.go +++ b/client/apemanager_list_chains.go @@ -65,7 +65,7 @@ func (c *Client) APEManagerListChains(ctx context.Context, prm PrmAPEManagerList var res ResAPEManagerListChains res.st, err = c.processResponse(resp) if err != nil || !apistatus.IsSuccessful(res.st) { - return nil, err + return &res, err } for _, ch := range resp.GetBody().GetChains() { diff --git a/client/netmap.go b/client/netmap.go index 8bedf46..98dcb6f 100644 --- a/client/netmap.go +++ b/client/netmap.go @@ -240,7 +240,7 @@ func (c *Client) NetMapSnapshot(ctx context.Context, _ PrmNetMapSnapshot) (*ResN var res ResNetMapSnapshot res.st, err = c.processResponse(resp) if err != nil { - return nil, err + return &res, err } if !apistatus.IsSuccessful(res.st) { diff --git a/client/object_delete.go b/client/object_delete.go index a9fe8e8..d32b98b 100644 --- a/client/object_delete.go +++ b/client/object_delete.go @@ -149,7 +149,7 @@ func (c *Client) ObjectDelete(ctx context.Context, prm PrmObjectDelete) (*ResObj var res ResObjectDelete res.st, err = c.processResponse(resp) if err != nil { - return nil, err + return &res, err } if !apistatus.IsSuccessful(res.st) { diff --git a/client/object_get.go b/client/object_get.go index 8c821de..17be84b 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -493,7 +493,7 @@ func (c *Client) ObjectHead(ctx context.Context, prm PrmObjectHead) (*ResObjectH var res ResObjectHead res.st, err = c.processResponse(resp) if err != nil { - return nil, err + return &res, err } if !apistatus.IsSuccessful(res.st) { diff --git a/client/object_hash.go b/client/object_hash.go index 108e0ce..6425f2e 100644 --- a/client/object_hash.go +++ b/client/object_hash.go @@ -190,7 +190,7 @@ func (c *Client) ObjectHash(ctx context.Context, prm PrmObjectHash) (*ResObjectH var res ResObjectHash res.st, err = c.processResponse(resp) if err != nil { - return nil, err + return &res, err } if !apistatus.IsSuccessful(res.st) { diff --git a/client/object_patch.go b/client/object_patch.go index ca7e8ed..a91cbb4 100644 --- a/client/object_patch.go +++ b/client/object_patch.go @@ -247,7 +247,7 @@ func (x *objectPatcher) Close(_ context.Context) (*ResObjectPatch, error) { x.res.st, x.err = x.client.processResponse(&x.respV2) if x.err != nil { - return nil, x.err + return &x.res, x.err } if !apistatus.IsSuccessful(x.res.st) { diff --git a/client/object_put_raw.go b/client/object_put_raw.go index c22bd05..d3d137a 100644 --- a/client/object_put_raw.go +++ b/client/object_put_raw.go @@ -157,7 +157,7 @@ func (x *objectWriterRaw) Close(_ context.Context) (*ResObjectPut, error) { x.res.st, x.err = x.client.processResponse(&x.respV2) if x.err != nil { - return nil, x.err + return &x.res, x.err } if !apistatus.IsSuccessful(x.res.st) { diff --git a/client/object_put_single.go b/client/object_put_single.go index bdef026..a2ff8a0 100644 --- a/client/object_put_single.go +++ b/client/object_put_single.go @@ -167,7 +167,7 @@ func (c *Client) ObjectPutSingle(ctx context.Context, prm PrmObjectPutSingle) (* var res ResObjectPutSingle res.st, err = c.processResponse(resp) if err != nil { - return nil, err + return &res, err } res.epoch = resp.GetMetaHeader().GetEpoch()