Skip to content

Typed error for 429 Rate Limited response#15

Merged
lavaturtle merged 3 commits intomainfrom
rate-limited-error
Mar 5, 2026
Merged

Typed error for 429 Rate Limited response#15
lavaturtle merged 3 commits intomainfrom
rate-limited-error

Conversation

@lavaturtle
Copy link
Copy Markdown
Contributor

When an API call to Mobilize America gets a 400-599 response, we raise a ClientError or ServerError. Currently we have more specific typed errors for 401 (UnauthorizedError) and 404 (NotFoundError).

This PR adds a specific typed error for 429 (RateLimitedError), so that clients can handle rate-limited responses in specialized ways.

Also included: DRY specs for typed error handling, and include them in the specs for all endpoints

@lavaturtle lavaturtle added the enhancement New feature or request label Mar 5, 2026
@ehimen-io ehimen-io self-requested a review March 5, 2026 21:25
Copy link
Copy Markdown
Contributor

@ehimen-io ehimen-io left a comment

Choose a reason for hiding this comment

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

LGTM!

@lavaturtle lavaturtle merged commit 5f2762a into main Mar 5, 2026
4 checks passed
@lavaturtle lavaturtle deleted the rate-limited-error branch March 5, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants