Show More
@@ -227,13 +227,19 b' def error_handler(exception, request):' | |||
|
227 | 227 | log.exception('failed to fetch settings') |
|
228 | 228 | rc_config = {} |
|
229 | 229 | |
|
230 | log.exception( | |
|
231 | 'error occurred handling this request for path: %s', request.path) | |
|
232 | 230 | base_response = HTTPInternalServerError() |
|
233 | 231 | # prefer original exception for the response since it may have headers set |
|
234 | 232 | if isinstance(exception, HTTPError): |
|
235 | 233 | base_response = exception |
|
236 | 234 | |
|
235 | def is_http_error(response): | |
|
236 | # error which should have traceback | |
|
237 | return response.status_code > 499 | |
|
238 | ||
|
239 | if is_http_error(base_response): | |
|
240 | log.exception( | |
|
241 | 'error occurred handling this request for path: %s', request.path) | |
|
242 | ||
|
237 | 243 | c = AttributeDict() |
|
238 | 244 | c.error_message = base_response.status |
|
239 | 245 | c.error_explanation = base_response.explanation or str(base_response) |
General Comments 0
You need to be logged in to leave comments.
Login now