diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-10-05 15:49:06 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-10-07 10:22:38 -0400 |
commit | 7edd1fcaed438a0566d37386ce8604f2565b4e6e (patch) | |
tree | 762abbd36f79737156744f22381fa5593c5121b4 /src/leap/bitmask/bonafide | |
parent | d270b7f11e404a3904fa32ed581196a4fa4e8604 (diff) |
[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
Diffstat (limited to 'src/leap/bitmask/bonafide')
-rw-r--r-- | src/leap/bitmask/bonafide/_srp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/bitmask/bonafide/_srp.py b/src/leap/bitmask/bonafide/_srp.py index 3f69b33b..3939c5ac 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 |