Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 31dac7f

Browse files
authored
Do not include stack traces for known exceptions when trying multiple federation destinations. (#10662)
1 parent 4db65f9 commit 31dac7f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

changelog.d/10662.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Do not print out stack traces for network errors when fetching data over federation.

synapse/federation/federation_client.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
Codes,
4444
FederationDeniedError,
4545
HttpResponseException,
46+
RequestSendFailed,
4647
SynapseError,
4748
UnsupportedRoomVersionError,
4849
)
@@ -558,7 +559,11 @@ async def _try_destination_list(
558559

559560
try:
560561
return await callback(destination)
561-
except InvalidResponseError as e:
562+
except (
563+
RequestSendFailed,
564+
InvalidResponseError,
565+
NotRetryingDestination,
566+
) as e:
562567
logger.warning("Failed to %s via %s: %s", description, destination, e)
563568
except UnsupportedRoomVersionError:
564569
raise

0 commit comments

Comments
 (0)