mirror of https://gitlab.com/litecord/litecord.git
add a HTTP 500 handler
This commit is contained in:
parent
c88148271d
commit
f7d530c787
9
run.py
9
run.py
|
|
@ -77,6 +77,15 @@ async def handle_litecord_err(err):
|
||||||
}), err.status_code
|
}), err.status_code
|
||||||
|
|
||||||
|
|
||||||
|
@app.errorhandler(500)
|
||||||
|
async def handle_500(err):
|
||||||
|
return jsonify({
|
||||||
|
'error': True,
|
||||||
|
'message': repr(err),
|
||||||
|
'internal_server_error': True,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
async def index():
|
async def index():
|
||||||
return 'hewwo'
|
return 'hewwo'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue