Show More
@@ -52,7 +52,16 b' class HooksHttpClient(object):' | |||
|
52 | 52 | log.error('Connection failed on %s', connection) |
|
53 | 53 | raise |
|
54 | 54 | response = connection.getresponse() |
|
55 | return json.loads(response.read()) | |
|
55 | ||
|
56 | response_data = response.read() | |
|
57 | ||
|
58 | try: | |
|
59 | return json.loads(response_data) | |
|
60 | except Exception: | |
|
61 | log.exception('Failed to decode hook response json data. ' | |
|
62 | 'response_code:%s, raw_data:%s', | |
|
63 | response.status, response_data) | |
|
64 | raise | |
|
56 | 65 | |
|
57 | 66 | def _serialize(self, hook_name, extras): |
|
58 | 67 | data = { |
General Comments 0
You need to be logged in to leave comments.
Login now