AI Engineer Portal
Your personal operating system for career transition.
Exercise
Retry a provider call with timeout and backoff
Implement an async wrapper that retries retryable provider failures with a timeout and bounded backoff.
Api Async / medium / Step 1 of 23
Async and provider control
Make waiting behavior explicit. Timeouts, retries, and concurrency limits matter more than squeezing everything into one helper.
- - Uses async boundaries coherently
- - Makes timeout and retry decisions legible
- - Would be maintainable under provider instability
- - Is timeout behavior explicit?
- - Is retryable failure separate from terminal failure?
- - Would logs reveal what actually timed out?
Practice
Generate a variation
Generate a new exercise variation to deepen understanding or practice a related concept.
Attempt history
Recent submissions
What part of this implementation felt least trustworthy, and what will you change on the next rep?
let me see the corret answer
No notes
No notes
No notes
Reference
Correct answer and review notes
Use the reference solution to compare structure, not just syntax.
async def call_with_retry(client, request):
return await client(request)
Most AI API integrations fail operationally because timeout and retry policy are inconsistent rather than absent.