Show More
@@ -245,7 +245,6 b' def prepare_callback_daemon(extras, prot' | |||||
245 |
|
245 | |||
246 | # register txn_id |
|
246 | # register txn_id | |
247 | extras['txn_id'] = txn_id |
|
247 | extras['txn_id'] = txn_id | |
248 |
|
||||
249 | log.debug('Prepared a callback daemon: %s at url `%s`', |
|
248 | log.debug('Prepared a callback daemon: %s at url `%s`', | |
250 | callback_daemon.__class__.__name__, callback_daemon.hooks_uri) |
|
249 | callback_daemon.__class__.__name__, callback_daemon.hooks_uri) | |
251 | return callback_daemon, extras |
|
250 | return callback_daemon, extras | |
@@ -292,6 +291,9 b' class Hooks(object):' | |||||
292 |
|
291 | |||
293 | try: |
|
292 | try: | |
294 | result = hook(extras) |
|
293 | result = hook(extras) | |
|
294 | if result is None: | |||
|
295 | raise Exception( | |||
|
296 | 'Failed to obtain hook result from func: {}'.format(hook)) | |||
295 | except HTTPBranchProtected as handled_error: |
|
297 | except HTTPBranchProtected as handled_error: | |
296 | # Those special cases doesn't need error reporting. It's a case of |
|
298 | # Those special cases doesn't need error reporting. It's a case of | |
297 | # locked repo or protected branch |
|
299 | # locked repo or protected branch |
@@ -114,13 +114,17 b' class VcsHttpProxy(object):' | |||||
114 | stream=True) |
|
114 | stream=True) | |
115 |
|
115 | |||
116 | log.debug('http-app: got vcsserver response: %s', response) |
|
116 | log.debug('http-app: got vcsserver response: %s', response) | |
|
117 | if response.status_code >= 500: | |||
|
118 | log.error('Exception returned by vcsserver at: %s %s, %s', | |||
|
119 | url, response.status_code, response.content) | |||
|
120 | ||||
117 | # Preserve the headers of the response, except hop_by_hop ones |
|
121 | # Preserve the headers of the response, except hop_by_hop ones | |
118 | response_headers = [ |
|
122 | response_headers = [ | |
119 | (h, v) for h, v in response.headers.items() |
|
123 | (h, v) for h, v in response.headers.items() | |
120 | if not wsgiref.util.is_hop_by_hop(h) |
|
124 | if not wsgiref.util.is_hop_by_hop(h) | |
121 | ] |
|
125 | ] | |
122 |
|
126 | |||
123 | # Build status argument for start_reponse callable. |
|
127 | # Build status argument for start_response callable. | |
124 | status = '{status_code} {reason_phrase}'.format( |
|
128 | status = '{status_code} {reason_phrase}'.format( | |
125 | status_code=response.status_code, |
|
129 | status_code=response.status_code, | |
126 | reason_phrase=response.reason) |
|
130 | reason_phrase=response.reason) |
General Comments 0
You need to be logged in to leave comments.
Login now