fix(backchannel): expose headers on slow_down errors (HTTP 429s)#744
Merged
adamjmcgrath merged 1 commit intoauth0:masterfrom Sep 17, 2025
Merged
Conversation
adamjmcgrath
approved these changes
Sep 17, 2025
Merged
kishore7snehil
pushed a commit
that referenced
this pull request
Sep 17, 2025
**Added** - fix(backchannel): expose headers on `slow_down` errors (HTTP 429s) [\#744](#744) ([pmalouin](https://github.com/pmalouin))
victorhos
pushed a commit
to victorhos/auth0-python
that referenced
this pull request
Nov 8, 2025
**Added** - fix(backchannel): expose headers on `slow_down` errors (HTTP 429s) [\auth0#744](auth0#744) ([pmalouin](https://github.com/pmalouin))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
In #720, we added the
headersfield on instances ofAuth0Error, with the intent to actually expose theRetry-Afterheaders included in backchannel responses (when theslow_downerror case is hit). This error case is actually producing an HTTP 429 status code, which leads to instantiating aRateLimitErrorinstead of anAuth0Error(the former was not adjusted to exposeheadersin the previous PR).In this PR, I am adding the
headersfield toRateLimitErroras well as setting this field when raising this exception.References
Please include relevant links supporting this change such as a:
Testing
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Checklist