mirror of
https://github.com/restic/restic.git
synced 2026-04-04 20:28:52 +00:00
Merge pull request #5452 from dominikschulz/fix/storage
Mark HTTP Error 507 as permanent
This commit is contained in:
8
changelog/unreleased/issue-5429
Normal file
8
changelog/unreleased/issue-5429
Normal file
@@ -0,0 +1,8 @@
|
||||
Bugfix: do not retry if rest-server runs out of space
|
||||
|
||||
Rest-server return error `507 Insufficient Storage` if no more storage
|
||||
capacity is available at the server. Restic now no longer retries uploads
|
||||
in this case.
|
||||
|
||||
https://github.com/restic/restic/issues/5429
|
||||
https://github.com/restic/restic/pull/5452
|
||||
@@ -182,7 +182,7 @@ func (b *Backend) IsPermanentError(err error) bool {
|
||||
|
||||
var rerr *restError
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user