Skip to main content

Practice · 2 of 2

Retry or Stop?

CHALLENGE
Difficulty: intermediate+25 XP

Implement should_retry(status: int, attempts: int) -> bool: retry ONLY server errors (5xx) and 429, and only when attempts < 3. Everything else returns False.

Back to lesson: Practice: HTTP Semantics Drills