summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/bitmask/core/dispatcher.py6
1 files changed, 5 insertions, 1 deletions
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})