sindresorhus / ky

🌳 Tiny & elegant JavaScript HTTP client based on the Fetch API
MIT License
13.62k stars 363 forks source link

Support per-request timeouts that trigger retries #546

Open victordidenko opened 10 months ago

victordidenko commented 10 months ago

Section https://github.com/sindresorhus/ky#retry states that

Retries are not triggered following a timeout.

What if I want a retry on timeout? How is it possible to achieve?

sindresorhus commented 10 months ago

You could check for TimeoutError and do another request. No other way currently.