Skip to content

Commit

Permalink
Http: treat status 5xx as permanent error
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Dec 7, 2024
1 parent ae55068 commit 37361a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tariff/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 37361a7

Please sign in to comment.