Closed lululombard closed 3 years ago
Hey @lululombard ! Thanks for opening this.
Based on the response payload you pasted, I assume that Discord is also returning the Retry-After
HTTP header with a value of 555
in your case, correct? If so, per the HTTP spec, the units are seconds (see the RetryAfter header section).
I would perhaps contact Discord to verify. It's possible that in a rate limiting scenario they actually do send you away for a long time. It could also be that they mistakenly made the units milliseconds, in which case this would be a bug on their end.
Either way, I don't think retryablehttp will support anything that goes against the HTTP spec.
Hope that helps! I'm going to close this but please feel free to re-open if you have any further questions.
Thanks for the reply! I ended up writing my own retry code, but I understand how you feel about this, it's definitely an issue on Discord's end 🙂
Hello, This package works well except with Discord webhook endpoints.
Their reply looks like this:
The thing is,
retry_after
is specified in milliseconds, butgo-retryablehttp
will wait for more than 9 minutes because it handles it as seconds.I looked at the doc and couldn't find a way to handle milliseconds. Did I miss something or is it a missing feature? Thanks