Skip to content

Commit

Permalink
allow RetryCondition and RetryHook wrap the original error
Browse files Browse the repository at this point in the history
if resp.Err has been set, wont overwrite it
  • Loading branch information
RonaldinhoL committed Apr 4, 2024
1 parent 7e8e5f4 commit 2b95fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (r *Request) do() (resp *Response, err error) {
if resp == nil {
resp = &Response{Request: r}
}
if err != nil {
if err != nil && resp.Err == nil {
resp.Err = err
}
}()
Expand Down

0 comments on commit 2b95fc5

Please sign in to comment.