Repository navigation
fix(falcon): Handle integer HTTP statuses - #8139
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4b8f9f6. Configure here.
sentrivana
left a comment
There was a problem hiding this comment.
Thanks @jap, this looks good to me.
This solves two issues: Falcon 3 and higher allow setting Response.status to an int, and the current code breaks on that. Falcon 4 and higher allow setting HTTPError/HTTPStatus.status to an int, and the current code breaks on that.
|
oh that's weird, I though I had ran ruff.. let me try again |
sentrivana
left a comment
There was a problem hiding this comment.
Hey @jap, there are two blockers before we can merge this, and since the branch is not open to changes from maintainers, you'll unfortunately need to do them manually:
- Rebase/merge latest master once #8140 has been merged (fixes unrelated test failures)
- Lint the change with ruff, see https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md#development-tooling
That should make CI pass.

Description
Add support for integer HTTP statuses in falcon Response objects and HTTPError/HTTPStatus exceptions.
The old code raised
AttributeError: 'int' object has no attribute 'startswith'in bad places.Issues