# HG changeset patch # User Martin Bornhold # Date 2016-10-06 14:08:34 # Node ID 706ee3c3416c8a94216e4e0f38504632270c5985 # Parent 8c23f9c301813e37dc414bb5232e8e4696b05e7a error-handling: Remove if condition to check if the response is a vcs response. We moved the VCS middleware out of the error handling. Therefore we don't need to skip the error handling anymore. diff --git a/rhodecode/lib/middleware/error_handling.py b/rhodecode/lib/middleware/error_handling.py --- a/rhodecode/lib/middleware/error_handling.py +++ b/rhodecode/lib/middleware/error_handling.py @@ -51,17 +51,10 @@ class PylonsErrorHandlingMiddleware(obje response = self.handle_request(request) return response(environ, start_response) - def is_vcs_response(self, response): - return 'X-RhodeCode-Backend' in response.headers - def is_http_error(self, response): # webob type error responses return (400 <= response.status_int <= 599) - def is_error_handling_needed(self, response): - return (self.is_http_error(response) and not - self.is_vcs_response(response)) - def reraise(self): return self._reraise @@ -77,7 +70,7 @@ class PylonsErrorHandlingMiddleware(obje """ try: response = request.get_response(self.app) - if self.is_error_handling_needed(response): + if self.is_http_error(response): response = webob_to_pyramid_http_response(response) return self.error_view(response, request) except HTTPError as e: # pyramid type exceptions