core: let pyramid handle tracebacks for all exceptions.

Otherwise we'll miss exception caused in pure pyramid view.
This commit is contained in:
Marcin Kuzminski 2017-01-12 23:36:07 +01:00
parent 4e8c6733a7
commit 4c2c087cf8
2 changed files with 2 additions and 1 deletions

View file

@ -227,6 +227,8 @@ def error_handler(exception, request):
log.exception('failed to fetch settings')
rc_config = {}
log.exception(
'error occurred handling this request for path: %s', request.path)
base_response = HTTPInternalServerError()
# prefer original exception for the response since it may have headers set
if isinstance(exception, HTTPError):

View file

@ -76,7 +76,6 @@ class PylonsErrorHandlingMiddleware(object):
except HTTPError as e: # pyramid type exceptions
return self.error_view(e, request)
except Exception as e:
log.exception(e)
if self.reraise():
raise