Skip to content

Commit

Permalink
updated retry with additional error types
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianwit@gmail.com authored and adrianwit@gmail.com committed Dec 3, 2019
1 parent 6e47fae commit 98bfe50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gs/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ func isRetryError(err error) bool {
if apiError.Code == http.StatusServiceUnavailable {
return true
}
if apiError.Code == http.StatusGatewayTimeout {
return true
}
}
message := err.Error()
return strings.Contains(message, backendError)
return strings.Contains(message, backendError) || strings.Contains(message, "connection reset")
}

func isBucketNotFound(err error) bool {
Expand Down

0 comments on commit 98bfe50

Please sign in to comment.