summary refs log tree commit diff
path: root/synapse/replication
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-03 09:25:15 +0100
committerErik Johnston <erik@matrix.org>2018-08-03 09:25:15 +0100
commitcb298ff623c1ad375084f7687b7f6e546c4c1c1f (patch)
tree81854fc4ae0a45bed487a58f2c40974b683adb92 /synapse/replication
parentNewsfile (diff)
parentMerge pull request #3645 from matrix-org/michaelkaye/mention_newsfragment (diff)
downloadsynapse-cb298ff623c1ad375084f7687b7f6e546c4c1c1f.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_repl_servlet
Diffstat (limited to 'synapse/replication')
-rw-r--r--synapse/replication/http/_base.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/replication/http/_base.py b/synapse/replication/http/_base.py
index 24f00d95fc..a7d1b2dabe 100644
--- a/synapse/replication/http/_base.py
+++ b/synapse/replication/http/_base.py
@@ -23,8 +23,7 @@ from twisted.internet import defer
 
 from synapse.api.errors import (
     CodeMessageException,
-    MatrixCodeMessageException,
-    SynapseError,
+    HttpResponseException,
 )
 from synapse.util.caches.response_cache import ResponseCache
 from synapse.util.stringutils import random_string
@@ -160,11 +159,11 @@ class ReplicationEndpoint(object):
                     # If we timed out we probably don't need to worry about backing
                     # off too much, but lets just wait a little anyway.
                     yield clock.sleep(1)
-            except MatrixCodeMessageException as e:
+            except HttpResponseException as e:
                 # We convert to SynapseError as we know that it was a SynapseError
                 # on the master process that we should send to the client. (And
                 # importantly, not stack traces everywhere)
-                raise SynapseError(e.code, e.msg, e.errcode)
+                raise e.to_synapse_error()
 
             defer.returnValue(result)