SDK
Python SDK
Description
The Starlette and FastAPI integrations' failed_request_status_codes option only affects HTTPException exceptions and other similar exception types with a status_code attribute. Other unhandled exceptions (e.g. ZeroDivisionError) that are raised by the request handler are sent to Sentry in the SentryAsgiMiddleware, which the failed_request_status_codes option does not affect.
Suggested Solution
Add something like the following:
The failed_request_status_codes option only controls whether HTTPException exceptions should be reported to Sentry. Other unhandled exceptions, which do not have a status_code attribute, are always reported to Sentry.