Do not include stack traces for known exceptions when trying multiple federation destinations. (#10662)
This commit is contained in:
parent
4db65f911a
commit
31dac7ffee
|
@ -0,0 +1 @@
|
||||||
|
Do not print out stack traces for network errors when fetching data over federation.
|
|
@ -43,6 +43,7 @@ from synapse.api.errors import (
|
||||||
Codes,
|
Codes,
|
||||||
FederationDeniedError,
|
FederationDeniedError,
|
||||||
HttpResponseException,
|
HttpResponseException,
|
||||||
|
RequestSendFailed,
|
||||||
SynapseError,
|
SynapseError,
|
||||||
UnsupportedRoomVersionError,
|
UnsupportedRoomVersionError,
|
||||||
)
|
)
|
||||||
|
@ -558,7 +559,11 @@ class FederationClient(FederationBase):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return await callback(destination)
|
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)
|
logger.warning("Failed to %s via %s: %s", description, destination, e)
|
||||||
except UnsupportedRoomVersionError:
|
except UnsupportedRoomVersionError:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue