sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

FastAPI integration not capturing error status codes

Open szokeasaurusrex opened this issue 1 year ago • 0 comments

Say we have a FastAPI application where we raise an error with a specific status code:

@app.get("/")
async def divide_by_zero():
    raise HTTPException(status_code=500)

This status code is missing in Sentry:

Image

Other server frameworks (e.g. Bottle) also seem to be affected. We should investigate whether this might be a more widespread issue.

szokeasaurusrex avatar Oct 04 '24 13:10 szokeasaurusrex