summaryrefslogtreecommitdiff
path: root/server/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/leap')
-rw-r--r--server/src/leap/soledad/server/_blobs.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index 4317deff..25266b18 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -52,10 +52,6 @@ logger = Logger()
# [ ] chunking (should we do it on the client or on the server?)
-class BlobAlreadyExists(Exception):
- pass
-
-
class IBlobsBackend(Interface):
"""
@@ -125,8 +121,9 @@ class FilesystemBlobsBackend(object):
except:
pass
if os.path.isfile(path):
- # XXX return some 5xx code
- raise BlobAlreadyExists()
+ # 409 - Conflict
+ request.setResponseCode(409)
+ return "Blob already exists: %s" % blob_id
used = self.get_total_storage(user)
if used > self.quota:
logger.error("Error 507: Quota exceeded for user: %s" % user)