summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorSriram Viswanathan <sriramv@thoughtworks.com>2017-03-15 11:39:56 -0300
committerKali Kaneko (leap communications) <kali@leap.se>2017-03-15 18:55:36 +0100
commitea80a99c4a7b04e65bc51d1ebf579b2485fd0c7f (patch)
tree67f7a613039e4a743948731ff43d9a8d9f2ba578 /src/leap/bitmask
parent949fb90c2b59ee8becd5c5e8135b3e86bb348fdf (diff)
[feature] Add errBack to log the doc_id when decrypt fails
with @deniscostadsc
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/mail/incoming/service.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/leap/bitmask/mail/incoming/service.py b/src/leap/bitmask/mail/incoming/service.py
index 471e842f..2ecd5876 100644
--- a/src/leap/bitmask/mail/incoming/service.py
+++ b/src/leap/bitmask/mail/incoming/service.py
@@ -339,6 +339,8 @@ class IncomingMail(Service):
d = self._keymanager.decrypt(doc.content[ENC_JSON_KEY], self._userid)
d.addErrback(self._errback)
+ d.addErrback(lambda _: logger.error(
+ '_decrypt_doc: Error decrypting document with ID %s' % doc.doc_id))
d.addCallback(process_decrypted)
d.addCallback(lambda data: (doc, data))
return d