Can stamina be configured to respect 429 Too Many Requests and Retry-After?
#103
Replies: 3 comments 3 replies
-
|
Oh—I meant to add: thank you for this excellent project and especially the thorough documentation and background information! |
Beta Was this translation helpful? Give feedback.
-
|
Would the |
Beta Was this translation helpful? Give feedback.
-
|
I have opened a PR in #125 -- I'm super sorry for the delays, I've had half-implemented solutions for months but never got it to the point of something releasable. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be convenient if the retry timing could be configured respect an HTTP
Retry-Afterheader, if set. I think this is not currently possible, because theonpredicate returns a yes/no determination only. There is no way to inject the logic, "Retry no sooner than X seconds."Building on #63 and #70, this could be introduced in a backward compatible way, by enabling the
onpredicate to return the minimum number of seconds to wait before retrying.Because a nonzero number is "truth-y", this extension is backward-compatible. Is this too "clever" or nonintuitive? Are there other potential meanings for "predicate returns a number" for which this interface should be reserved?
I could not find any prior discussion of
Retry-Afteror429 Too Many Requests.Is this of interest and in scope? I would be happy to contribute a PR.
Beta Was this translation helpful? Give feedback.
All reactions