mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
Mark HTTP Error 507 as permanent
This change classifies HTTP error 507 (Insufficient Storage) as a permanent error that should not be retried. I keep running into this once in a while and there is literally no point in retrying when the server is full. Fixes #5429 Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
This commit is contained in:
committed by
Michael Eischer
parent
0e381bdbf1
commit
48e5c0984e
@@ -182,7 +182,7 @@ func (b *Backend) IsPermanentError(err error) bool {
|
|||||||
|
|
||||||
var rerr *restError
|
var rerr *restError
|
||||||
if errors.As(err, &rerr) {
|
if errors.As(err, &rerr) {
|
||||||
if rerr.StatusCode == http.StatusRequestedRangeNotSatisfiable || rerr.StatusCode == http.StatusUnauthorized || rerr.StatusCode == http.StatusForbidden {
|
if rerr.StatusCode == http.StatusRequestedRangeNotSatisfiable || rerr.StatusCode == http.StatusUnauthorized || rerr.StatusCode == http.StatusForbidden || rerr.StatusCode == http.StatusInsufficientStorage {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user