summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-18 15:12:50 +0000
committerErik Johnston <erik@matrix.org>2016-03-18 15:12:50 +0000
commit9adf0e92bc3dbe4305beaf602406fc5ca51ea37e (patch)
tree0ce5516f826f9d0066ae64b4cf74abfa8b57a7e1
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/edu_yield (diff)
downloadsynapse-9adf0e92bc3dbe4305beaf602406fc5ca51ea37e.tar.xz
Catch exceptions from EDU handling
-rw-r--r--synapse/federation/federation_server.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index a961b17aea..76820b924b 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -166,7 +166,12 @@ class FederationServer(FederationBase):
         received_edus_counter.inc()
 
         if edu_type in self.edu_handlers:
-            yield self.edu_handlers[edu_type](origin, content)
+            try:
+                yield self.edu_handlers[edu_type](origin, content)
+            except SynapseError as e:
+                logger.info("Failed to handle edu %r: %r", edu_type, e)
+            except Exception as e:
+                logger.exception("Failed to handle edu %r", edu_type, e)
         else:
             logger.warn("Received EDU of type %s with no handler", edu_type)