forked from LBRYCommunity/lbry-sdk
Merge pull request #278 from lbryio/fix-uncaught-analytics-exception
fix uncaught analytics exception
This commit is contained in:
commit
0e9ad16a2e
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,9 @@ def log_response(fn):
|
|||
def _log(future):
|
||||
if future.cancelled():
|
||||
log.warning('Request was unexpectedly cancelled')
|
||||
elif future.exception():
|
||||
exc, traceback = future.exception_info()
|
||||
log.warning('Failed to send an analytics event', exc_info=(type(exc), exc, traceback))
|
||||
else:
|
||||
response = future.result()
|
||||
log.debug('Response (%s): %s', response.status_code, response.content)
|
||||
|
|
Loading…
Reference in a new issue