##// END OF EJS Templates
ux: show list of causes for vcs unavailable error page
dan -
r683:4961d77a default
parent child Browse files
Show More
@@ -248,7 +248,6 b' def webob_to_pyramid_http_response(webob'
248 248
249 249
250 250 def error_handler(exception, request):
251 # TODO: dan: replace the old pylons error controller with this
252 251 from rhodecode.model.settings import SettingsModel
253 252 from rhodecode.lib.utils2 import AttributeDict
254 253
@@ -277,6 +276,10 b' def error_handler(exception, request):'
277 276 if not c.rhodecode_name:
278 277 c.rhodecode_name = 'Rhodecode'
279 278
279 c.causes = []
280 if hasattr(base_response, 'causes'):
281 c.causes = base_response.causes
282
280 283 response = render_to_response(
281 284 '/errors/error_document.html', {'c': c}, request=request,
282 285 response=base_response)
@@ -127,6 +127,11 b' class VCSServerUnavailable(HTTPBadGatewa'
127 127 """ HTTP Exception class for VCS Server errors """
128 128 code = 502
129 129 title = 'VCS Server Error'
130 causes = [
131 'VCS Server is not running',
132 'Incorrect vcs.server=host:port',
133 'Incorrect vcs.server.protocol',
134 ]
130 135 def __init__(self, message=''):
131 136 self.explanation = 'Could not connect to VCS Server'
132 137 if message:
@@ -39,11 +39,17 b''
39 39 <p>${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}</p>
40 40 %endif
41 41 <div class="inner-column">
42 <h4>Possible Cause</h4>
42 <h4>Possible Causes</h4>
43 43 <ul>
44 % if c.causes:
45 %for cause in c.causes:
46 <li>${cause}</li>
47 %endfor
48 %else:
44 49 <li>The resource may have been deleted.</li>
45 50 <li>You may not have access to this repository.</li>
46 51 <li>The link may be incorrect.</li>
52 %endif
47 53 </ul>
48 54 </div>
49 55 <div class="inner-column">
General Comments 0
You need to be logged in to leave comments. Login now