summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2016-12-12 09:33:39 +0000
committerGitHub <noreply@github.com>2016-12-12 09:33:39 +0000
commit85cd30b1fd3324af29753307bc0fa5beaa493bb3 (patch)
tree5ee32b96a60434f5f4c9542e3b7fa514b6a581df
parentMerge pull request #1684 from matrix-org/rav/no_run_tox_from_setup (diff)
parentRemove unused import (diff)
downloadsynapse-85cd30b1fd3324af29753307bc0fa5beaa493bb3.tar.xz
Merge pull request #1686 from matrix-org/rav/fix_federation_key_fails
E2E key query: handle federation fails
-rw-r--r--synapse/handlers/e2e_keys.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py
index fd11935b40..b63a660c06 100644
--- a/synapse/handlers/e2e_keys.py
+++ b/synapse/handlers/e2e_keys.py
@@ -111,6 +111,11 @@ class E2eKeysHandler(object):
                 failures[destination] = {
                     "status": 503, "message": "Not ready for retry",
                 }
+            except Exception as e:
+                # include ConnectionRefused and other errors
+                failures[destination] = {
+                    "status": 503, "message": e.message
+                }
 
         yield preserve_context_over_deferred(defer.gatherResults([
             preserve_fn(do_remote_query)(destination)
@@ -222,6 +227,11 @@ class E2eKeysHandler(object):
                 failures[destination] = {
                     "status": 503, "message": "Not ready for retry",
                 }
+            except Exception as e:
+                # include ConnectionRefused and other errors
+                failures[destination] = {
+                    "status": 503, "message": e.message
+                }
 
         yield preserve_context_over_deferred(defer.gatherResults([
             preserve_fn(claim_client_keys)(destination)