##// END OF EJS Templates
svn: add better connection error logging in case the SVN backend is offline
marcink -
r3573:bcafaf1e default
parent child Browse files
Show More
@@ -87,20 +87,22 b' class SimpleSvnApp(object):'
87 stream = True
87 stream = True
88
88
89 stream = stream
89 stream = stream
90 log.debug(
90 log.debug('Calling SVN PROXY at `%s`, using method:%s. Stream: %s',
91 'Calling SVN PROXY: method:%s via `%s`, Stream: %s',
91 path_info, req_method, stream)
92 req_method, path_info, stream)
92 try:
93 response = requests.request(
93 response = requests.request(
94 req_method, path_info,
94 req_method, path_info,
95 data=data, headers=request_headers, stream=stream)
95 data=data, headers=request_headers, stream=stream)
96 except requests.ConnectionError:
97 log.exception('ConnectionError occurred for endpoint %s', path_info)
98 raise
96
99
97 if response.status_code not in [200, 401]:
100 if response.status_code not in [200, 401]:
101 text = '\n{}'.format(response.text) if response.text else ''
98 if response.status_code >= 500:
102 if response.status_code >= 500:
99 log.error('Got SVN response:%s with text:\n`%s`',
103 log.error('Got SVN response:%s with text:`%s`', response, text)
100 response, response.text)
101 else:
104 else:
102 log.debug('Got SVN response:%s with text:\n`%s`',
105 log.debug('Got SVN response:%s with text:`%s`', response, text)
103 response, response.text)
104 else:
106 else:
105 log.debug('got response code: %s', response.status_code)
107 log.debug('got response code: %s', response.status_code)
106
108
General Comments 0
You need to be logged in to leave comments. Login now