Hello,
I’ve got the following exception view:
@view_config(
context=Exception,
permission=NO_PERMISSION_REQUIRED,
)
def handle_exception(exc, request):
"""Last resort view function."""
…
I had assumed that the `request` parameter here is the same instance as the `request` parameter from the view function that raised the exception. However, that does not seem to be the case. (In fact, the SQLAlchemy session bound to the view function’s request has been expired by the time the exception view is entered.)
While a normal view function’s `request` parameter is of type pyramid.request.Request, the exception view’s is of type pyramid.util.Request. Which doesn’t seem to exist though: AttributeError: module 'pyramid.util' has no attribute 'Request'
It would be helpful if the docs would shed more light on this. Any more details would be great!
Thanks!
Jens