Show More
@@ -199,9 +199,17 b' def make_not_found_view(config):' | |||||
199 | - old webob type exceptions get converted to pyramid exceptions |
|
199 | - old webob type exceptions get converted to pyramid exceptions | |
200 | - pyramid exceptions are passed to the error handler view |
|
200 | - pyramid exceptions are passed to the error handler view | |
201 | """ |
|
201 | """ | |
|
202 | def is_vcs_response(request): | |||
|
203 | return True == request.environ.get( | |||
|
204 | 'rhodecode.vcs.skip_error_handling') | |||
|
205 | ||||
|
206 | def is_webob_error(response): | |||
|
207 | # webob type error responses | |||
|
208 | return (400 <= response.status_int <= 599) | |||
|
209 | ||||
202 | try: |
|
210 | try: | |
203 | response = pylons_app_as_view(context, request) |
|
211 | response = pylons_app_as_view(context, request) | |
204 | if 400 <= response.status_int <= 599: # webob type error responses |
|
212 | if is_webob_error(response) and not is_vcs_response(request): | |
205 | return error_handler( |
|
213 | return error_handler( | |
206 | webob_to_pyramid_http_response(response), request) |
|
214 | webob_to_pyramid_http_response(response), request) | |
207 | except HTTPError as e: # pyramid type exceptions |
|
215 | except HTTPError as e: # pyramid type exceptions |
General Comments 0
You need to be logged in to leave comments.
Login now