Skip to content

feat: add rate limit error class#178

Merged
drish merged 3 commits intomainfrom
feat/rate-limit-error
Nov 13, 2025
Merged

feat: add rate limit error class#178
drish merged 3 commits intomainfrom
feat/rate-limit-error

Conversation

@drish
Copy link
Collaborator

@drish drish commented Nov 12, 2025

closes #33

Summary by cubic

Add RateLimitError for 429 responses to make rate limit and quota errors clear and actionable. Also bumps the package to v2.20.0 and updates the contact topics docs link.

  • New Features

    • Added RateLimitError and mapped 429 errors: rate_limit_exceeded, daily_quota_exceeded, monthly_quota_exceeded.
    • raise_for_code_and_type now raises RateLimitError for these cases.
    • Added tests covering all 429 error types.
  • Bug Fixes

    • Corrected contacts topics docs URL in _topics.py.

Written for commit ef834d4. Summary will update automatically on new commits.

@drish drish requested a review from gabrielmfern November 12, 2025 00:44
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

"""
List all topics for a contact.
see more: https://resend.com/docs/api-reference/contacts/list-contact-topics
see more: https://resend.com/docs/api-reference/contacts/get-contact-topics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this related to the PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i noticed the link was wrong and fixed it.

@drish drish merged commit 442d080 into main Nov 13, 2025
19 checks passed
@drish drish deleted the feat/rate-limit-error branch November 13, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add error handler for RateLimit error

2 participants