mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-05 12:28:22 +00:00
fix: forward HTTPException headers in http_exception_handler
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user