Skip to content

Handle Too Many Requests Response (HTTP 429) #114

@i2h3

Description

@i2h3

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

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!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

🧭 Planning evaluation (don't pick)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions