Handle HttpResponseException when using federation client.

Otherwise we just log exceptions everywhere.
This commit is contained in:
Erik Johnston 2019-06-07 10:29:35 +01:00
parent 4f581faa98
commit a46ef1e3a4
3 changed files with 19 additions and 18 deletions

View file

@ -49,9 +49,7 @@ def _create_rerouter(func_name):
def http_response_errback(failure):
failure.trap(HttpResponseException)
e = failure.value
if e.code == 403:
raise e.to_synapse_error()
return failure
raise e.to_synapse_error()
def request_failed_errback(failure):
failure.trap(RequestSendFailed)