wsgi-stack: Add a more meaningful comment why we insert the error middleware.

This commit is contained in:
Martin Bornhold 2016-10-06 15:39:03 +02:00
parent b20f75676a
commit 643e092c92

View file

@ -192,8 +192,11 @@ def make_not_found_view(config):
pylons_app = VCSMiddleware(
pylons_app, settings, appenlight_client, registry=config.registry)
# Add an error handling middleware to convert errors from the old pylons
# app into a proper error page response.
# The pylons app is executed inside of the pyramid 404 exception handler.
# Exceptions which are raised inside of it are not handled by pyramid
# again. Therefore we add a middleware that invokes the error handler in
# case of an exception or error response. This way we return proper error
# HTML pages in case of an error.
reraise = (settings.get('debugtoolbar.enabled', False) or
rhodecode.disable_error_handler)
pylons_app = PylonsErrorHandlingMiddleware(