diff options
author | Kali Kaneko <kali@leap.se> | 2014-01-06 15:19:01 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-01-06 15:19:01 -0400 |
commit | f98f66549d6762bbfc072ef6afe0057798a4da27 (patch) | |
tree | 268983c0ac554860c39f25a7521fe45bc816aab7 /server | |
parent | a2fc60a03f701abd2309dee23c383f1189ce3cf4 (diff) | |
parent | 89d3e4a1321ff9701ac67933f8e649cfecd1d95e (diff) |
Merge remote-tracking branch 'drebs-github/bug/4435_add-proper-error-reporting-to-shared-db-lock' into develop
Diffstat (limited to 'server')
-rw-r--r-- | server/changes/bug_4435_send-timeout-response | 1 | ||||
-rw-r--r-- | server/src/leap/soledad/server/__init__.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/server/changes/bug_4435_send-timeout-response b/server/changes/bug_4435_send-timeout-response new file mode 100644 index 00000000..ccc74959 --- /dev/null +++ b/server/changes/bug_4435_send-timeout-response @@ -0,0 +1 @@ + o Send propper lock timeout response (#4435). diff --git a/server/src/leap/soledad/server/__init__.py b/server/src/leap/soledad/server/__init__.py index a4b25fe2..00d3c8c1 100644 --- a/server/src/leap/soledad/server/__init__.py +++ b/server/src/leap/soledad/server/__init__.py @@ -121,6 +121,7 @@ from leap.soledad.common.errors import ( InvalidTokenError, NotLockedError, AlreadyLockedError, + LockTimedOutError, ) @@ -225,7 +226,9 @@ class LockResource(object): """ # obtain filesystem lock if not self._try_obtain_filesystem_lock(): - self._responder.send_response_json(408) # error: request timeout + self._responder.send_response_json( + LockTimedOutError.status, # error: request timeout + error=LockTimedOutError.wire_description) return created_lock = False |