diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-20 15:49:40 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-20 15:49:40 +0000 |
commit | 7fbc573c4abd72348fbba1dc234e7ea3c02ea3a0 (patch) | |
tree | 008d1aafc41fb9de3a0509f5104ccc4934327d2a /synapse/federation | |
parent | Have ClientReaderSlavedStore inherit RegistrationStore (#5806) (diff) | |
parent | Merge pull request #5810 from matrix-org/erikj/no_server_reachable (diff) | |
download | synapse-7fbc573c4abd72348fbba1dc234e7ea3c02ea3a0.tar.xz |
Merge pull request #5810 from matrix-org/erikj/no_server_reachable
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_client.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index 6e03ce21af..bec3080895 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -511,9 +511,8 @@ class FederationClient(FederationBase): The [Deferred] result of callback, if it succeeds Raises: - SynapseError if the chosen remote server returns a 300/400 code. - - RuntimeError if no servers were reachable. + SynapseError if the chosen remote server returns a 300/400 code, or + no servers were reachable. """ for destination in destinations: if destination == self.server_name: @@ -538,7 +537,7 @@ class FederationClient(FederationBase): except Exception: logger.warn("Failed to %s via %s", description, destination, exc_info=1) - raise RuntimeError("Failed to %s via any server" % (description,)) + raise SynapseError(502, "Failed to %s via any server" % (description,)) def make_membership_event( self, destinations, room_id, user_id, membership, content, params |