Show More
@@ -136,7 +136,12 b' class CurlSession(object):' | |||||
136 | curl.setopt(curl.FOLLOWLOCATION, allow_redirects) |
|
136 | curl.setopt(curl.FOLLOWLOCATION, allow_redirects) | |
137 | curl.setopt(curl.WRITEDATA, response_buffer) |
|
137 | curl.setopt(curl.WRITEDATA, response_buffer) | |
138 | curl.setopt(curl.HTTPHEADER, headers_list) |
|
138 | curl.setopt(curl.HTTPHEADER, headers_list) | |
139 | curl.perform() |
|
139 | ||
|
140 | try: | |||
|
141 | curl.perform() | |||
|
142 | except pycurl.error as exc: | |||
|
143 | log.error('Failed to call endpoint url: {} using pycurl'.format(url)) | |||
|
144 | raise | |||
140 |
|
145 | |||
141 | status_code = curl.getinfo(pycurl.HTTP_CODE) |
|
146 | status_code = curl.getinfo(pycurl.HTTP_CODE) | |
142 | content_type = curl.getinfo(pycurl.CONTENT_TYPE) |
|
147 | content_type = curl.getinfo(pycurl.CONTENT_TYPE) |
General Comments 0
You need to be logged in to leave comments.
Login now