From 5fcb1a2f70e3f075bf9caec2dc0fdb59ec09890d Mon Sep 17 00:00:00 2001 From: Dominic Zimmer Date: Sat, 18 Jul 2020 00:07:45 +0200 Subject: [PATCH] Add verbose errors #2 --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 67eaa1c..283173f 100644 --- a/main.py +++ b/main.py @@ -24,7 +24,8 @@ async def handler(request: aiohttp.web.Request): return aiohttp.web.Response(status=200) except Exception as e: traceback.print_exc() - return aiohttp.web.Response(status=400) + resp = {"error": e.args[0]} + return aiohttp.web.json_response(resp) @routes.post('/api/{method}')