The CLI can be… odd… when handling errors. Make them nicer for the CLI

This commit is contained in:
Joseph Schorr 2014-01-29 14:08:14 -05:00
parent 2b134158f5
commit 3dc3af9eb2
2 changed files with 4 additions and 5 deletions

View file

@ -47,11 +47,10 @@ def abort(status_code, message=None, issue=None, **kwargs):
# Create the final response data and message.
data = {}
data['error'] = message
if issue_url:
data['info_url'] = issue_url
message = message + '. For more information: ' + issue_url
data['error'] = message
resp = jsonify(data)
resp.status_code = status_code