[#210] client/put_transformer: Fix error handling
All checks were successful
DCO / DCO (pull_request) Successful in 1m1s
Tests and linters / Tests (1.21) (pull_request) Successful in 1m17s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m29s
Tests and linters / Lint (pull_request) Successful in 2m39s

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2024-03-19 15:36:51 +03:00
parent edd40474e8
commit 6f248436a5

View file

@ -47,6 +47,10 @@ func (x *objectWriterTransformer) WritePayloadChunk(ctx context.Context, chunk [
} }
func (x *objectWriterTransformer) Close(ctx context.Context) (*ResObjectPut, error) { func (x *objectWriterTransformer) Close(ctx context.Context) (*ResObjectPut, error) {
if x.err != nil {
return nil, x.err
}
ai, err := x.ot.Close(ctx) ai, err := x.ot.Close(ctx)
if err != nil { if err != nil {
return nil, err return nil, err