Add verbose errors #2
This commit is contained in:
parent
d8af7c3ae0
commit
5fcb1a2f70
3
main.py
3
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}')
|
||||
|
Loading…
Reference in New Issue
Block a user