From 7edd1fcaed438a0566d37386ce8604f2565b4e6e Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Wed, 5 Oct 2016 15:49:06 -0400 Subject: [refactor] do not print traceback for expected errors Add the ability to declare an exceptions as 'expected'. This will avoid logging the backtrace on the bitmaskd log. We will just forward the message in the json that we return to the caller. - Resolves: #8506 --- src/leap/bitmask/bonafide/_srp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/bonafide/_srp.py') diff --git a/src/leap/bitmask/bonafide/_srp.py b/src/leap/bitmask/bonafide/_srp.py index 3f69b33..3939c5a 100644 --- a/src/leap/bitmask/bonafide/_srp.py +++ b/src/leap/bitmask/bonafide/_srp.py @@ -133,7 +133,9 @@ class SRPSignupMechanism(object): msg = 'username ' + msg[0] else: msg = 'unknown signup error' - raise SRPRegistrationError(msg) + error = SRPRegistrationError(msg) + error.expected = True + raise error else: username = signup.get('login') return username -- cgit v1.2.3