diff --git a/pylons_app/config/middleware.py b/pylons_app/config/middleware.py --- a/pylons_app/config/middleware.py +++ b/pylons_app/config/middleware.py @@ -51,10 +51,9 @@ def make_app(global_conf, full_stack=Tru # Display error documents for 401, 403, 404 status codes (and # 500 when debug is disabled) if asbool(config['debug']): - #don't handle 404, since mercurial does it for us. - app = StatusCodeRedirect(app, [400, 401, 403]) + app = StatusCodeRedirect(app) else: - app = StatusCodeRedirect(app, [400, 401, 403, 500]) + app = StatusCodeRedirect(app, [400, 401, 403, 404, 500]) # Establish the Registry for this application app = RegistryManager(app)