Skip to content

Commit

Permalink
Update log level to warning for errors within retry block (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandyydk committed Sep 17, 2023
1 parent 11ff868 commit e12ab69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion request.go
Expand Up @@ -930,7 +930,7 @@ func (r *Request) Execute(method, url string) (*Response, error) {

resp, err = r.client.execute(r)
if err != nil {
r.log.Errorf("%v, Attempt %v", err, r.Attempt)
r.log.Warnf("%v, Attempt %v", err, r.Attempt)
}

return resp, err
Expand All @@ -943,6 +943,10 @@ func (r *Request) Execute(method, url string) (*Response, error) {
ResetMultipartReaders(r.client.RetryResetReaders),
)

if err != nil {
r.log.Errorf("%v", err)
}

r.client.onErrorHooks(r, resp, unwrapNoRetryErr(err))
return resp, unwrapNoRetryErr(err)
}
Expand Down

0 comments on commit e12ab69

Please sign in to comment.