From 0b0150ad73c52ea5b23def899edb819bd3318eb1 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 16 Nov 2016 19:10:49 -0500 Subject: [PATCH 1/2] fix uncaught analytics exception --- lbrynet/analytics/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/analytics/api.py b/lbrynet/analytics/api.py index f064a466d..438ba1084 100644 --- a/lbrynet/analytics/api.py +++ b/lbrynet/analytics/api.py @@ -16,6 +16,8 @@ def log_response(fn): def _log(future): if future.cancelled(): log.warning('Request was unexpectedly cancelled') + elif future.exception(): + log.warning(future.exception_info()) else: response = future.result() log.debug('Response (%s): %s', response.status_code, response.content) From cd0a9ba9e84b487c40c84c5fcf28c5cfd169ba89 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 22 Nov 2016 15:18:01 -0500 Subject: [PATCH 2/2] feedback from job --- lbrynet/analytics/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/analytics/api.py b/lbrynet/analytics/api.py index 438ba1084..8c703a2d7 100644 --- a/lbrynet/analytics/api.py +++ b/lbrynet/analytics/api.py @@ -17,7 +17,8 @@ def log_response(fn): if future.cancelled(): log.warning('Request was unexpectedly cancelled') elif future.exception(): - log.warning(future.exception_info()) + 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)