# HG changeset patch # User Marcin Kuzminski # Date 2017-09-21 15:04:15 # Node ID 4490c841b5a1a11806500aff02f6841783e25413 # Parent 6e35717709ecaf16fa90844df42c4fa2eb577920 auth: because we use 404 for access denied too. Show proper message about it in error page diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -237,9 +237,12 @@ def error_handler(exception, request): log.exception( 'error occurred handling this request for path: %s', request.path) + error_explanation = base_response.explanation or str(base_response) + if base_response.status_code == 404: + error_explanation += " Or you don't have permission to access it." c = AttributeDict() c.error_message = base_response.status - c.error_explanation = base_response.explanation or str(base_response) + c.error_explanation = error_explanation c.visual = AttributeDict() c.visual.rhodecode_support_url = (