forked from TrueCloudLab/frostfs-node
[#1512] object: Make raw PutSingle
check status within response
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
ca0a33ea0f
commit
9cd1bcef06
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@ import (
|
|||
sessionV2 "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/session"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/signature"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/checksum"
|
||||
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
|
||||
containerSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
"git.frostfs.info/TrueCloudLab/tzhash/tz"
|
||||
|
@ -353,6 +354,9 @@ func (s *Service) redirectPutSingleRequest(ctx context.Context,
|
|||
err = fmt.Errorf("response verification failed: %w", err)
|
||||
}
|
||||
|
||||
st := apistatus.FromStatusV2(resp.GetMetaHeader().GetStatus())
|
||||
err = apistatus.ErrFromStatus(st)
|
||||
|
||||
return
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue