From 04729b86f8e2d83002aad2d2298c3fc7e4836b2f Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 26 May 2020 11:42:22 +0100 Subject: [PATCH] Fix incorrect exception handling in KeyUploadServlet.on_POST (#7563) Introduced in #7556 --- changelog.d/7563.misc | 1 + synapse/app/generic_worker.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/7563.misc diff --git a/changelog.d/7563.misc b/changelog.d/7563.misc new file mode 100644 index 0000000000..ed271f9de8 --- /dev/null +++ b/changelog.d/7563.misc @@ -0,0 +1 @@ +Stop logging some expected HTTP request errors as exceptions. diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index 440341cb3c..5afe52f8d4 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -214,7 +214,7 @@ class KeyUploadServlet(RestServlet): self.main_uri + request.uri.decode("ascii"), body, headers=headers ) except HttpResponseException as e: - raise e.to_synapse() from e + raise e.to_synapse_error() from e except RequestSendFailed as e: raise SynapseError(502, "Failed to talk to master") from e