how to get access to error message from abort command when using custom error handler

前端 未结 4 2003
心在旅途
心在旅途 2020-12-03 04:23

Using a python flask server, I want to be able to throw an http error response with the abort command and use a custom response string and a custom message in the body

4条回答
  •  甜味超标
    2020-12-03 05:00

    I simply do it like this:

        abort(400, description="Required parameter is missing")
    

提交回复
热议问题