Pick the fix
Which retry policy is best for a GET request?
Hint 1 of 1
Which errors can succeed on a second try?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Retry timeouts, 5xx and 429 up to 3 times with exponential delay plus jitter, using Task.sleep(for:) so cancellation stops it
Correct. Transient errors only, bounded and cancellable.
Why not the others?
- B Retry every error immediately, 10 times. It hammers the server and retries errors that can never succeed.
- C Retry all errors, including 400 and 401, every second. Client errors won't fix themselves by retrying.
- D Retry forever with a fixed 1-second delay. Unbounded retries waste battery and never surface the failure.