From 0f6dae78b45335e0428ed5aba4672b6ad297f82a Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Fri, 21 Oct 2016 17:03:03 -0400 Subject: [bug] avoid choking with some failures --- src/leap/bitmask/core/dispatcher.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index 2d22b57..11a319f 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -474,7 +474,11 @@ def _format_error(failure): # we will not print a full traceback expected = getattr(failure.value, 'expected', False) if not expected: - logger.failure('[DISPATCHER] Unexpected error:') + try: + logger.failure('[DISPATCHER] Unexpected error:') + except: + logger.debug('[DISPATCHER] Unexpected error: %r' % failure.value) + logger.debug('%r' % failure) # if needed, we could add here the exception type as an extra field return json.dumps({'error': failure.value.message, 'result': None}) -- cgit v1.2.3