Http: treat status 5xx as permanent error
This commit is contained in:
parent
ae550685a2
commit
37361a7b9f
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ func bo() backoff.BackOff {
|
|||
func backoffPermanentError(err error) error {
|
||||
var se request.StatusError
|
||||
if errors.As(err, &se) {
|
||||
if code := se.StatusCode(); code >= 400 && code < 500 {
|
||||
if code := se.StatusCode(); code >= 400 && code <= 599 {
|
||||
return backoff.Permanent(se)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue