Handle the 429 cooldown in the quickstart examples - #6
Conversation
Both quickstarts crashed with an uncaught DidwwRateLimitedError when start_verification hit the destination cooldown. Catch it and print retry_after, matching the existing wrong-code handling below it. Co-Authored-By: Clanker
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Both examples correctly handle the documented 429 cooldown path without affecting successful execution.
Review effort: Balanced
Findings: None
What changed in this PR
Adds graceful cooldown handling to both quickstart workflows.
Changes:
- Catch
DidwwRateLimitedErrorduring verification startup. - Display retry guidance and exit with status 1.
| File | Description |
|---|---|
examples/quickstart_sync.py |
Handles cooldown errors in the synchronous example. |
examples/quickstart_async.py |
Handles cooldown errors in the asynchronous example. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.



Summary
Both quickstart examples called
start_verificationwith no handling forDidwwRateLimitedError, so hitting the destination cooldown (429,destination_in_cooldown) crashed the script with an uncaught exceptioninstead of showing the documented recovery path.
Changes
Wrap the
start_verificationcall intry/except DidwwRateLimitedErrorinboth
examples/quickstart_sync.pyandexamples/quickstart_async.py, printretry_after(falling back to a generic message when it isNone), andexit with status 1 — matching the existing
DidwwValidationErrorhandlingalready below it in each file. The other examples (
auth_modes.py,polling.py, the callback examples) don't callstart_verification, sothey needed no change.
Verification
ruff check .,ruff format --check .,mypy,pyrightandpytestallpass locally.