This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Add http header Retry-After to error 429 response #15840
Copy link
Copy link
Closed
Labels
O-OccasionalAffects or can be seen by some users regularly or most users rarelyAffects or can be seen by some users regularly or most users rarelyS-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.Z-Spec-BlockedThis change is blocked on specification (e.g. an MSC).This change is blocked on specification (e.g. an MSC).
Description
Description:
I'm using Ky to make calls to the Matrix API. Whenever I receive a rate-limited error with status code 429 I'm forced to parse the body of the error in order to retrieve the value for retry_after_ms before doing the next request.
Ky has a built in retry mechanism and honors the http header Retry-After that represents either an absolute date/time or a delay in seconds.
Can you please add the appropriate http header to 429 errors? I'm using Synapse v1.82 in a dockerized setup.
Thanks,
Thomas
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
O-OccasionalAffects or can be seen by some users regularly or most users rarelyAffects or can be seen by some users regularly or most users rarelyS-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.Z-Spec-BlockedThis change is blocked on specification (e.g. an MSC).This change is blocked on specification (e.g. an MSC).