summary refs log tree commit diff
path: root/synapse/rest/media
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-07 12:34:52 +0100
committerErik Johnston <erik@matrix.org>2019-06-07 12:39:10 +0100
commit95d38afe96bfb38e02de9767603b2655c07a7e0f (patch)
treec852e77d75cef0adb4fbfe76c06754e4b99018f8 /synapse/rest/media
parentMerge tag 'v1.0.0rc1' into develop (diff)
downloadsynapse-95d38afe96bfb38e02de9767603b2655c07a7e0f.tar.xz
Don't log exception when failing to fetch remote content.
In particular, let's not log stack traces when we stop processing
becuase the response body was too large.
Diffstat (limited to 'synapse/rest/media')
-rw-r--r--synapse/rest/media/v1/media_repository.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/media_repository.py b/synapse/rest/media/v1/media_repository.py
index 8569677355..a4929dd5db 100644
--- a/synapse/rest/media/v1/media_repository.py
+++ b/synapse/rest/media/v1/media_repository.py
@@ -386,8 +386,10 @@ class MediaRepository(object):
                 raise SynapseError(502, "Failed to fetch remote media")
 
             except SynapseError:
-                logger.exception("Failed to fetch remote media %s/%s",
-                                 server_name, media_id)
+                logger.warn(
+                    "Failed to fetch remote media %s/%s",
+                    server_name, media_id,
+                )
                 raise
             except NotRetryingDestination:
                 logger.warn("Not retrying destination %r", server_name)