mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 14:04:14 -04:00
Merge pull request #3639 from matrix-org/rav/refactor_error_handling
Clean up handling of errors from outbound requests
This commit is contained in:
commit
1fa98495d0
9 changed files with 124 additions and 142 deletions
|
@ -379,7 +379,7 @@ class MediaRepository(object):
|
|||
logger.warn("HTTP error fetching remote media %s/%s: %s",
|
||||
server_name, media_id, e.response)
|
||||
if e.code == twisted.web.http.NOT_FOUND:
|
||||
raise SynapseError.from_http_response_exception(e)
|
||||
raise e.to_synapse_error()
|
||||
raise SynapseError(502, "Failed to fetch remote media")
|
||||
|
||||
except SynapseError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue