mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 22:04:56 -04:00
Fix a number of logged errors caused by remote servers being down. (#10400)
This commit is contained in:
parent
0ae95b3847
commit
7695ca0618
5 changed files with 66 additions and 19 deletions
|
@ -1414,12 +1414,15 @@ class FederationHandler(BaseHandler):
|
|||
|
||||
Invites must be signed by the invitee's server before distribution.
|
||||
"""
|
||||
pdu = await self.federation_client.send_invite(
|
||||
destination=target_host,
|
||||
room_id=event.room_id,
|
||||
event_id=event.event_id,
|
||||
pdu=event,
|
||||
)
|
||||
try:
|
||||
pdu = await self.federation_client.send_invite(
|
||||
destination=target_host,
|
||||
room_id=event.room_id,
|
||||
event_id=event.event_id,
|
||||
pdu=event,
|
||||
)
|
||||
except RequestSendFailed:
|
||||
raise SynapseError(502, f"Can't connect to server {target_host}")
|
||||
|
||||
return pdu
|
||||
|
||||
|
@ -3031,9 +3034,13 @@ class FederationHandler(BaseHandler):
|
|||
await member_handler.send_membership_event(None, event, context)
|
||||
else:
|
||||
destinations = {x.split(":", 1)[-1] for x in (sender_user_id, room_id)}
|
||||
await self.federation_client.forward_third_party_invite(
|
||||
destinations, room_id, event_dict
|
||||
)
|
||||
|
||||
try:
|
||||
await self.federation_client.forward_third_party_invite(
|
||||
destinations, room_id, event_dict
|
||||
)
|
||||
except (RequestSendFailed, HttpResponseException):
|
||||
raise SynapseError(502, "Failed to forward third party invite")
|
||||
|
||||
async def on_exchange_third_party_invite_request(
|
||||
self, event_dict: JsonDict
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue