Add the request URL to the reported error info
This commit is contained in:
parent
aef719c71a
commit
c7e616edb9
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ def abort(status_code, message=None, **kwargs):
|
|||
params = dict(request.view_args)
|
||||
params.update(kwargs)
|
||||
|
||||
params['url'] = request.url
|
||||
params['status_code'] = status_code
|
||||
params['message'] = message
|
||||
|
||||
|
@ -36,7 +37,7 @@ def abort(status_code, message=None, **kwargs):
|
|||
auth_token.friendly_name or auth_token.code)
|
||||
|
||||
# Log the abort.
|
||||
logger.error('Error %s: %s. Arguments: %s' % (status_code, message, params))
|
||||
logger.error('Error %s: %s; Arguments: %s' % (status_code, message, params))
|
||||
resp = jsonify({'error': message})
|
||||
resp.status_code = status_code
|
||||
|
||||
|
|
Reference in a new issue