summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-06-13 10:52:45 +0100
committerGitHub <noreply@github.com>2017-06-13 10:52:45 +0100
commita09e09ce768c9f06b1e53c0df6d583ce16061a5f (patch)
tree23881ca5116a402b95ce7249521e2531b870fe8c
parentMerge pull request #2266 from matrix-org/erikj/host_in_room (diff)
parentThrow exception when not retrying when downloading media (diff)
downloadsynapse-a09e09ce768c9f06b1e53c0df6d583ce16061a5f.tar.xz
Merge pull request #2277 from matrix-org/erikj/media
Throw exception when not retrying when downloading media
-rw-r--r--synapse/rest/media/v1/media_repository.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/media_repository.py b/synapse/rest/media/v1/media_repository.py
index caca96c222..bae2b4c757 100644
--- a/synapse/rest/media/v1/media_repository.py
+++ b/synapse/rest/media/v1/media_repository.py
@@ -184,6 +184,7 @@ class MediaRepository(object):
                     raise
                 except NotRetryingDestination:
                     logger.warn("Not retrying destination %r", server_name)
+                    raise SynapseError(502, "Failed to fetch remote media")
                 except Exception:
                     logger.exception("Failed to fetch remote media %s/%s",
                                      server_name, media_id)