Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
6745b7de
Commit
6745b7de
authored
5 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Handle failing to talk to master over replication
parent
a2419b27
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/replication/http/_base.py
+9
-1
9 additions, 1 deletion
synapse/replication/http/_base.py
with
9 additions
and
1 deletion
synapse/replication/http/_base.py
+
9
−
1
View file @
6745b7de
...
@@ -17,11 +17,17 @@ import abc
...
@@ -17,11 +17,17 @@ import abc
import
logging
import
logging
import
re
import
re
from
six
import
raise_from
from
six.moves
import
urllib
from
six.moves
import
urllib
from
twisted.internet
import
defer
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.caches.response_cache
import
ResponseCache
from
synapse.util.stringutils
import
random_string
from
synapse.util.stringutils
import
random_string
...
@@ -175,6 +181,8 @@ class ReplicationEndpoint(object):
...
@@ -175,6 +181,8 @@ class ReplicationEndpoint(object):
# on the master process that we should send to the client. (And
# on the master process that we should send to the client. (And
# importantly, not stack traces everywhere)
# importantly, not stack traces everywhere)
raise
e
.
to_synapse_error
()
raise
e
.
to_synapse_error
()
except
RequestSendFailed
as
e
:
raise_from
(
SynapseError
(
502
,
"
Failed to talk to master
"
),
e
)
defer
.
returnValue
(
result
)
defer
.
returnValue
(
result
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment