summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-05-12 15:23:50 +0100
committerMark Haines <mjark@negativecurvature.net>2015-05-12 15:23:50 +0100
commita6fb2aa2a5a5837d77bed8813f9e59bfe6be8999 (patch)
tree154ff4598b9740104abd5cf465c98cf2797c5406 /synapse/handlers/message.py
parentMerge pull request #149 from matrix-org/erikj/backfill (diff)
parentMake distributer.fire work as it did (diff)
downloadsynapse-a6fb2aa2a5a5837d77bed8813f9e59bfe6be8999.tar.xz
Merge pull request #144 from matrix-org/erikj/logging_context
Preserving logging contexts
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 1809a44a99..867fdbefb0 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -20,6 +20,7 @@ from synapse.api.errors import RoomError, SynapseError
 from synapse.streams.config import PaginationConfig
 from synapse.events.utils import serialize_event
 from synapse.events.validator import EventValidator
+from synapse.util import unwrapFirstError
 from synapse.util.logcontext import PreserveLoggingContext
 from synapse.types import UserID, RoomStreamToken
 
@@ -313,7 +314,7 @@ class MessageHandler(BaseHandler):
                             event.room_id
                         ),
                     ]
-                )
+                ).addErrback(unwrapFirstError)
 
                 start_token = now_token.copy_and_replace("room_key", token[0])
                 end_token = now_token.copy_and_replace("room_key", token[1])
@@ -338,7 +339,7 @@ class MessageHandler(BaseHandler):
         yield defer.gatherResults(
             [handle_room(e) for e in room_list],
             consumeErrors=True
-        )
+        ).addErrback(unwrapFirstError)
 
         ret = {
             "rooms": rooms_ret,