feat-(smoke test passed)

This commit is contained in:
2026-11-06 15:56:10 +03:00
parent 97caa7e8ff
commit b9c2869b64
5 changed files with 30 additions and 14 deletions
+12 -1
View File
@@ -61,7 +61,18 @@ async def http_exception_handler(request: Request, exc: HTTPException):
}
code = code_map.get(exc.status_code, "internal_error")
return create_error_response(message=str(exc.detail), code=code, status_code=exc.status_code, request_id=request_id)
response_headers = {"X-Request-Id": request_id}
if exc.headers:
response_headers.update(exc.headers)
return JSONResponse(
status_code=exc.status_code,
content={"error": {
"code": code,
"message": str(exc.detail),
"request_id": request_id}
},
headers=response_headers)
@application.exception_handler(Exception)
async def global_exception_handler(request: Request, exc: Exception):