Merge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_repl_servlet

This commit is contained in:
Erik Johnston 2018-08-03 09:25:15 +01:00
commit cb298ff623
67 changed files with 1074 additions and 648 deletions

View file

@ -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)