[#210] client/put_transformer: Fix error handling

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