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
a8f40a83
Commit
a8f40a83
authored
5 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Return 502 not 500 when failing to reach any remote server.
parent
55a0c98d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/federation/federation_client.py
+3
-4
3 additions, 4 deletions
synapse/federation/federation_client.py
with
3 additions
and
4 deletions
synapse/federation/federation_client.py
+
3
−
4
View file @
a8f40a83
...
...
@@ -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
Runtim
eError
(
"
Failed to %s via any server
"
%
(
description
,))
raise
Synaps
eError
(
502
,
"
Failed to %s via any server
"
%
(
description
,))
def
make_membership_event
(
self
,
destinations
,
room_id
,
user_id
,
membership
,
content
,
params
...
...
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