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

Commit

Permalink
Do not include stack traces for known exceptions when trying multiple…
Browse files Browse the repository at this point in the history
… federation destinations. (#10662)
  • Loading branch information
clokep authored Aug 23, 2021
1 parent 4db65f9 commit 31dac7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

0 comments on commit 31dac7f

Please sign in to comment.