5 ms·
Discord API is guilty of one of these very examples, they send a retry-after header on 429 responses, but the thing is.. is it in Bananas? Apples? Elephants?
by Jamie9912 5y ago
Discord API is guilty of one of these very examples, they send a retry-after header on 429 responses, but the thing is.. is it in Bananas? Apples? Elephants?
- timando 5y agoThe retry-after header is documented as being in seconds (or a date). https://httpwg.org/specs/rfc7231.html#header.retry-after https://httpwg.org/specs/rfc7231.html#header.retry-after
- deleted 5y ago[deleted]
- Jamie9912 5y agoFunny because Discord implements it as milliseconds
- ruuda 5y agoUnfortunately it's part of http. One thing you can do is to send both the standard Retry-After header for tools that rely on it, and a nonstandard but unambiguous Retry-After-Seconds. That makes responses self-documenting. (One downside is that you now have two numbers, and if you introduce a bug that makes them different, it will be more confusing.)