forked from TrueCloudLab/frostfs-sdk-go
[#275] client: Return status from all methods
Since status is checked first in handleError method, it should be returned from client methods Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
99d5bf913b
commit
1b67ab9608
8 changed files with 14 additions and 38 deletions
|
@ -156,12 +156,8 @@ 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
|
||||
}
|
||||
|
||||
if !apistatus.IsSuccessful(x.res.st) {
|
||||
return &x.res, nil
|
||||
if x.err != nil || !apistatus.IsSuccessful(x.res.st) {
|
||||
return &x.res, x.err
|
||||
}
|
||||
|
||||
const fieldID = "ID"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue