Consider 502 as a temporary error (#204)
This commit is contained in:
Родитель
5d8d5fa544
Коммит
a0589d15da
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче