From 8d7a37ed35205e1eb2b8fc7dd3cfca3076ef03a2 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sat, 15 Feb 2025 15:00:26 +0800 Subject: [PATCH] update --- app/main.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/main.py b/app/main.py index 384afa6..b7036d1 100644 --- a/app/main.py +++ b/app/main.py @@ -70,10 +70,7 @@ async def validation_exception_handler(request, exc): logging.exception(f"请求参数错误: {str(exc)}") return CustomJSONResponse( status_code=400, - content=error_response( - code=400, - message=str(exc) - ) + content=str(exc) ) @app.exception_handler(HTTPException) @@ -81,8 +78,5 @@ async def http_exception_handler(request, exc): logging.exception(f"HTTP异常: {str(exc)}") return CustomJSONResponse( status_code=exc.status_code, - content=error_response( - code=exc.status_code, - message=exc.detail - ) + content=str(exc) ) \ No newline at end of file