Retry-After header missing for 429?

I have a custom Sentry SDK for Unreal Engine, and I just ran into a client bug where I ended up getting 429 errors back. Looking at the documentation I’m supposed to delay retries until after the Retry-After header timeout, but there’s no such header returned. Is there a reasonable default I can apply if the header is missing?

Hi @judgeaxl, if you don’t get a Retry-After back you’re limited by the load balancer. I would default to 1 hour because this supposedly happens in extreme situations.

OK, that sounds a bit extreme, I had maybe 20 events fired in a loop over a faulty property, but I guess coming from the same source that fast it might make sense. Should really drop out on the first error anyway :slight_smile:

My guess is that you kept sending after the first 429 and that’s why it happened. Not sure though. You can try switching your IP somehow to get around it.

Could be, I didn’t stop to look at each individual error. Are SDKs expected to wait for completion on each event before sending the next, to make sure the first 429 is captured? Right now if I have more than one event I’ll send them in parallel.

I would not send events in parallel but rather have a single queue and a single worker, but not sure it’s a big deal. More importantly, SDKs are supposed to drop events until they’re out of the rate-limiting because otherwise old events will keep piling up and you will run into the rate limiting instantly again.

OK, no problem. It’s an easy change and running in parallel doesn’t really give me anything anyway, it just happened to be the easiest implementation at the time. I’d rather follow the specs. Thanks!