[#1512] object: Make raw PutSingle check status within response

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-12-23 14:53:04 +03:00 committed by Evgenii Stratonikov
parent ca0a33ea0f
commit 9cd1bcef06

View file

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