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