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}')