From 71c341b9aea1097e0d8f4ccc2eee9728599ea8b0 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Tue, 18 Apr 2017 22:18:16 +0200 Subject: [bug] pass along no polkit error --- src/leap/bitmask/core/dispatcher.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/leap/bitmask/core') diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index 9d486009..52de62b6 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -537,10 +537,12 @@ def _format_error(failure): """ Logs the failure backtrace, and returns a json containing the error message. - """ - # If a exception declares the 'expected' attribute as True, - # we will not print a full traceback + If a exception declares the 'expected' attribute as True, + we will not print a full traceback. instead, we will dispatch + the ``exception`` message attribute as the ``error`` field in the response + json. + """ expected = getattr(failure.value, 'expected', False) if not expected: -- cgit v1.2.3