fix uncaught analytics exception

This commit is contained in:
Jack 2016-11-16 19:10:49 -05:00
parent 0490250da4
commit 0b0150ad73

View file

@ -16,6 +16,8 @@ def log_response(fn):
def _log(future): def _log(future):
if future.cancelled(): if future.cancelled():
log.warning('Request was unexpectedly cancelled') log.warning('Request was unexpectedly cancelled')
elif future.exception():
log.warning(future.exception_info())
else: else:
response = future.result() response = future.result()
log.debug('Response (%s): %s', response.status_code, response.content) log.debug('Response (%s): %s', response.status_code, response.content)