How to raise exception in imported file through flask app in json format python?

前端 未结 0 762
一向
一向 2020-12-14 12:43

I have the flask_app.py which has the exception handling,

from flask import abort
@app.errorhandler(404)
def NotFoundError(e):
    return jsonify(error=str(e)         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题