Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed retrying of API requests when WebDAV is full #853

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Zotero/Controllers/API/Alamofire+RxSwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ extension ObservableType where Element == (Data?, HTTPURLResponse) {
case .responseValidationFailed(let reason):
switch reason {
case .unacceptableStatusCode(let code):
if code == 429 || (code >= 500 && code <= 599) {
// Ignore 507 code, if WebDAV server is full, retrying won't help.
if code == 429 || (code >= 500 && code <= 599 && code != 507) {
if let retryHeader = responseError.headers?["Retry-After"] {
if let time = retryHeader as? Double {
return .constant(time)
Expand Down
Loading