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

Do not include stack traces for known exceptions when trying multiple federation destinations. #10662

Merged
merged 2 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/10662.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not print out stack traces for network errors when fetching data over federation.
7 changes: 6 additions & 1 deletion synapse/federation/federation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
Codes,
FederationDeniedError,
HttpResponseException,
RequestSendFailed,
SynapseError,
UnsupportedRoomVersionError,
)
Expand Down Expand Up @@ -558,7 +559,11 @@ async def _try_destination_list(

try:
return await callback(destination)
except InvalidResponseError as e:
except (
RequestSendFailed,
InvalidResponseError,
NotRetryingDestination,
) as e:
logger.warning("Failed to %s via %s: %s", description, destination, e)
except UnsupportedRoomVersionError:
raise
Expand Down