@app.errorhandler(400)
def custom400(error):
    response = jsonify({'message': error.description['message']})
abort(400, {'message': 'custom error message to appear in body'})
how to get access to error message from abort command when using custom error handler