[#1710] object: Sign response even if CloseAndRecv
returns error
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m12s
Pre-commit hooks / Pre-commit (push) Successful in 1m54s
Build / Build Components (push) Successful in 2m3s
Tests and linters / Staticcheck (push) Successful in 4m31s
Tests and linters / Lint (push) Successful in 4m39s
OCI image / Build container images (push) Successful in 4m53s
Tests and linters / gopls check (push) Successful in 4m47s
Tests and linters / Tests (push) Successful in 4m52s
Tests and linters / Run gofumpt (push) Successful in 5m58s
Tests and linters / Tests with -race (push) Successful in 7m3s
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m12s
Pre-commit hooks / Pre-commit (push) Successful in 1m54s
Build / Build Components (push) Successful in 2m3s
Tests and linters / Staticcheck (push) Successful in 4m31s
Tests and linters / Lint (push) Successful in 4m39s
OCI image / Build container images (push) Successful in 4m53s
Tests and linters / gopls check (push) Successful in 4m47s
Tests and linters / Tests (push) Successful in 4m52s
Tests and linters / Run gofumpt (push) Successful in 5m58s
Tests and linters / Tests with -race (push) Successful in 7m3s
* Sign service wraps an error with status and sign a response even if error occurs from `CloseAndRecv` in `Put` and `Patch` methods. Close #1710 Change-Id: I7e1d8fe00db53607fa6e04ebec9a29b87349f8a1 Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
dcfd895449
commit
64c1392513
1 changed files with 4 additions and 2 deletions
|
@ -96,7 +96,8 @@ func (s *putStreamSigner) CloseAndRecv(ctx context.Context) (resp *object.PutRes
|
|||
} else {
|
||||
resp, err = s.stream.CloseAndRecv(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not close stream and receive response: %w", err)
|
||||
err = fmt.Errorf("could not close stream and receive response: %w", err)
|
||||
resp = new(object.PutResponse)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +133,8 @@ func (s *patchStreamSigner) CloseAndRecv(ctx context.Context) (resp *object.Patc
|
|||
} else {
|
||||
resp, err = s.stream.CloseAndRecv(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not close stream and receive response: %w", err)
|
||||
err = fmt.Errorf("could not close stream and receive response: %w", err)
|
||||
resp = new(object.PatchResponse)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue