Skip to content

Commit

Permalink
Consider 502 as a temporary error (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
zezha-msft authored Sep 10, 2020
1 parent 5d8d5fa commit a0589d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azblob/zc_storage_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (e *storageError) Error() string {
// Temporary returns true if the error occurred due to a temporary condition (including an HTTP status of 500 or 503).
func (e *storageError) Temporary() bool {
if e.response != nil {
if (e.response.StatusCode == http.StatusInternalServerError) || (e.response.StatusCode == http.StatusServiceUnavailable) {
if (e.response.StatusCode == http.StatusInternalServerError) || (e.response.StatusCode == http.StatusServiceUnavailable) || (e.response.StatusCode == http.StatusBadGateway) {
return true
}
}
Expand Down

0 comments on commit a0589d1

Please sign in to comment.