Skip to content

fix(falcon): Handle integer HTTP statuses - #8139

Open
jap wants to merge 2 commits into
getsentry:masterfrom
jap:int-status
Open

jap wants to merge 2 commits into
getsentry:masterfrom
jap:int-status

Conversation

@jap

@jap jap commented Oct 27, 2026

Copy link
Copy Markdown

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

@jap
jap requested a review from a team as a code owner October 27, 2026 20:13

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread sentry_sdk/integrations/falcon.py Outdated
jap added 2 commits October 27, 2026 21:18
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.

This branch has not been deployed

No deployments
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.

falcon integration fails when response.status is an int

1 participant