fix: 1243 returns both resetErr and the request's err on retries.Halt#1363
fix: 1243 returns both resetErr and the request's err on retries.Halt#1363pengux wants to merge 6 commits intodatabricks:mainfrom
Conversation
094e65a to
a3a7ead
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. If this PR is still relevant, please leave a comment or push new changes to keep it open. Thank you for your contributions. |
|
Still relevant |
|
Hi @pengux, sorry for the late response on this. The fix makes sense, the original request error should not be silently discarded when the body can't be reset. One small suggestion on the error message: I think the original request error should come first since that's the one the caller cares about, with the reset failure as secondary context: fmt.Errorf("%w (unable to reset request body for retry: %w)", err, resetErr)This way The changelog entry also needs to follow the format used in Let us know if you'd like to make these changes, or if you'd prefer we take the PR over from here and land it. Either way works for us. |
@renaudhartert-db Thanks for reviewing, I've updated the PR according to your feedback now. |
# Conflicts: # httpclient/api_client.go
# Conflicts: # NEXT_CHANGELOG.md # httpclient/api_client.go
Co-authored-by: Isaac
1d7cd36 to
80d15aa
Compare
…traryReader Co-authored-by: Isaac
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
What changes are proposed in this pull request?
This fixes the issue with the request error being discarded when the request body is not able to be reset.
How is this tested?
Test are added to assert that both errors (resetErr and request's err) are wrapped in the returned error.
Fixes #1243