From 5847c74109b74286d9eace6d49f6aefdf3621704 Mon Sep 17 00:00:00 2001 From: unclecode Date: Sun, 17 Mar 2024 12:57:14 +0800 Subject: [PATCH] Update chains.py - Update error message in ExceptionHandler --- app/libs/chains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/libs/chains.py b/app/libs/chains.py index 53576cf..2386458 100644 --- a/app/libs/chains.py +++ b/app/libs/chains.py @@ -309,4 +309,4 @@ async def handle(self, context: Context): class ExceptionHandler(Handler): async def handle(self, context: Context, exception: Exception): print(f"Error processing the request: {exception}") - return JSONResponse(content={"error": "An unexpected error occurred"}, status_code=500) \ No newline at end of file + return JSONResponse(content={"error": "An unexpected error occurred. " + str(exception)}, status_code=500) \ No newline at end of file