update APIException

This commit is contained in:
2023-11-22 14:35:37 +09:00
parent edad30e264
commit ea6e603036
4 changed files with 51 additions and 42 deletions

View File

@@ -54,8 +54,8 @@ async def api_exception_handler(request: Request, exc: APIException):
loop = asyncio.get_event_loop()
loop.run_in_executor(None,writedblog,exc)
return JSONResponse(
status_code=400,
content={"detail": f"{exc.error.content}"},
status_code=exc.status_code,
content={"detail": f"{exc.detail}"},
)
@app.get("/api/v1")