instantclick icon indicating copy to clipboard operation
instantclick copied to clipboard

Add retry on 504 responses and other kinds of timeouts

Open dkubb opened this issue 10 years ago • 1 comments

When instantclick makes a GET request to a URL and receives a 504 Gateway Timeout response or otherwise times out, it should retry the request N times (ideally with some kind of exponential backoff to avoid hammering the server).

The benefit of this is that it will smooth out some kinds of transient errors due to network issues outside of our control.

dkubb avatar May 02 '14 18:05 dkubb

Retrying requests on failures would complicate the code a fair bit. What I’m currently considering is to redirect outside of InstantClick (via location.href = …) for HTTP codes other than 2xx.

dieulot avatar May 13 '14 14:05 dieulot