Error != 200
This commit is contained in:
4
main.py
4
main.py
@@ -25,7 +25,7 @@ async def handler(request: aiohttp.web.Request):
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
resp = {"error": e.args[0]}
|
||||
return aiohttp.web.json_response(resp)
|
||||
return aiohttp.web.json_response(status=400, resp)
|
||||
|
||||
|
||||
@routes.post('/api/{method}')
|
||||
@@ -43,7 +43,7 @@ async def handler(request: aiohttp.web.Request):
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
resp = {"error": e.args[0]}
|
||||
return aiohttp.web.json_response(resp)
|
||||
return aiohttp.web.json_response(status=400, resp)
|
||||
|
||||
@routes.get('/dealer/{usertoken}')
|
||||
async def handler(request):
|
||||
|
||||
Reference in New Issue
Block a user