fix: forward HTTPException headers in http_exception_handler

This commit is contained in:
9qeklajc
2026-09-18 21:28:00 +02:00
parent abc444f80e
commit 148fe5d07a
+2 -1
View File
@@ -92,7 +92,8 @@ async def http_exception_handler(request: Request, exc: Exception) -> JSONRespon
content = {"detail": detail}
content["request_id"] = request_id
return JSONResponse(status_code=status_code, content=content)
headers = getattr(exc, "headers", None)
return JSONResponse(status_code=status_code, content=content, headers=headers)
def json_compliant(value: object) -> object: