core: properly report 502 errors for gevent and gunicorn....
marcink -
r2554:4c3d007d default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -132,6 +132,7
132 132 'Incorrect vcs.server=host:port',
133 133 'Incorrect vcs.server.protocol',
134 134 ]
135
135 136 def __init__(self, message=''):
136 137 self.explanation = 'Could not connect to VCS Server'
137 138 if message:
@@ -197,6 +197,13
197 197 response = session.post(url, data=msgpack.packb(payload))
198 198 except pycurl.error as e:
199 199 raise exceptions.HttpVCSCommunicationError(e)
200 except Exception as e:
201 message = getattr(e, 'message', '')
202 if 'Failed to connect' in message:
203 # gevent doesn't return proper pycurl errors
204 raise exceptions.HttpVCSCommunicationError(e)
205 else:
206 raise
200 207
201 208 if response.status_code >= 400:
202 209 log.error('Call to %s returned non 200 HTTP code: %s',
Comments 0
You need to be logged in to leave comments. Login now