def METHOD_NAME(error):
    # Please not that InvalidEmailError is re-raised for InvalidEmail or InvalidPhone,
    # work should be done in the utils app to tidy up these errors.
    return jsonify(result="error", message=str(error)), 400