-
Notifications
You must be signed in to change notification settings - Fork 1k
Handle Too Many Requests Response (HTTP 429) #9441
Copy link
Copy link
Open
Labels
feature: 📁 file providermacOS File Provider Extension, more general also known as virtual file system.macOS File Provider Extension, more general also known as virtual file system.os: 🍎 macOSApple macOS, formerly also known as OS XApple macOS, formerly also known as OS X
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
feature: 📁 file providermacOS File Provider Extension, more general also known as virtual file system.macOS File Provider Extension, more general also known as virtual file system.os: 🍎 macOSApple macOS, formerly also known as OS XApple macOS, formerly also known as OS X
Type
Projects
- StatusShow more project fields📄 To do
Problem
There is a real use case where a server with many files and folders was upgraded and as a consequence all clients are showering it with update requests simultaneously. At some point, the server stops serving the individual clients and provides a "429 Too Many Requests" response.
Situation
The synchronization engine of the desktop client is not handling that yet but considers it a generic error and will leave the item as it is until the next synchronization. The file provider code apparently does not consider this scenario either, just like NextcloudKit onto which it is built on. The latter is not responsible for handling this kind of business logic, anyway.
Solution
Implement a generic error handling for all network requests of a file provider domain which delays retries of failed (HTTP 429 specifically) network requests by either a fallback value or whatever the server is (possibly) defining in the "Retry-After" header, if it is higher than 0. Ensure the implementation is consistent with the classic desktop synchronization!
Note
This replaces the following issue: nextcloud/nextcloudfileproviderkit#114