update APIException
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user