From c7e616edb9f0e55e1cb4794f00b2fd79575a1dae Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 24 Jan 2014 20:40:22 -0500 Subject: [PATCH] Add the request URL to the reported error info --- util/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/http.py b/util/http.py index e4e1aa89f..a07b1e8a7 100644 --- a/util/http.py +++ b/util/http.py @@ -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