diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-01-07 12:29:56 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-01-07 12:29:56 -0300 |
commit | f57270eb597dee6104a4c507705ef5d1ba6a7516 (patch) | |
tree | 2e7280c065301306611fd60d614111c19e43acaa /common/src | |
parent | f98f66549d6762bbfc072ef6afe0057798a4da27 (diff) | |
parent | 82628d8284c5c11452da75a6604f2f68b8dd8520 (diff) |
Merge remote-tracking branch 'refs/remotes/drebs/feature/4918_ensure-server-side-locks-use-temporary-directory' into develop
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/leap/soledad/common/errors.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common/src/leap/soledad/common/errors.py b/common/src/leap/soledad/common/errors.py index 62de19f8..c41e0b0f 100644 --- a/common/src/leap/soledad/common/errors.py +++ b/common/src/leap/soledad/common/errors.py @@ -67,10 +67,19 @@ class LockTimedOutError(errors.U1DBError): status = 408 +class CouldNotObtainLockError(errors.U1DBError): + """ + Exception raised when timing out while trying to lock the shared database. + """ + + wire_description = "error obtaining lock" + status = 500 + + # update u1db "wire description to status" and "wire description to exception" # maps. for e in [InvalidTokenError, NotLockedError, AlreadyLockedError, - LockTimedOutError]: + LockTimedOutError, CouldNotObtainLockError]: http_errors.wire_description_to_status.update({ e.wire_description: e.status}) errors.wire_description_to_exc.update({ |