Skip to content
Snippets Groups Projects
Commit 6745b7de authored by Erik Johnston's avatar Erik Johnston
Browse files

Handle failing to talk to master over replication

parent a2419b27
No related branches found
No related tags found
No related merge requests found
......@@ -17,11 +17,17 @@ import abc
import logging
import re
from six import raise_from
from six.moves import urllib
from twisted.internet import defer
from synapse.api.errors import CodeMessageException, HttpResponseException
from synapse.api.errors import (
CodeMessageException,
HttpResponseException,
RequestSendFailed,
SynapseError,
)
from synapse.util.caches.response_cache import ResponseCache
from synapse.util.stringutils import random_string
......@@ -175,6 +181,8 @@ class ReplicationEndpoint(object):
# on the master process that we should send to the client. (And
# importantly, not stack traces everywhere)
raise e.to_synapse_error()
except RequestSendFailed as e:
raise_from(SynapseError(502, "Failed to talk to master"), e)
defer.returnValue(result)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment