From d48c695af501ae5fb6737d9a81734aa3d71c6ef8 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 22 Feb 2022 15:22:16 +0000 Subject: [PATCH 1/2] Better error message when failing to request from another process --- synapse/replication/http/_base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/replication/http/_base.py b/synapse/replication/http/_base.py index bc1d28dd19b1..2e697c74a6bb 100644 --- a/synapse/replication/http/_base.py +++ b/synapse/replication/http/_base.py @@ -268,7 +268,9 @@ async def send_request(*, instance_name: str = "master", **kwargs: Any) -> Any: raise e.to_synapse_error() except Exception as e: _outgoing_request_counter.labels(cls.NAME, "ERR").inc() - raise SynapseError(502, "Failed to talk to main process") from e + raise SynapseError( + 502, f"Failed to talk to {instance_name} process" + ) from e _outgoing_request_counter.labels(cls.NAME, 200).inc() return result From a07b2e4f5e2daab825ee21cee673c1e463431fbd Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 22 Feb 2022 15:23:40 +0000 Subject: [PATCH 2/2] Newsfile --- changelog.d/12060.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12060.misc diff --git a/changelog.d/12060.misc b/changelog.d/12060.misc new file mode 100644 index 000000000000..d771e6a1b393 --- /dev/null +++ b/changelog.d/12060.misc @@ -0,0 +1 @@ +Fix error message when a worker process fails to talk to another worker process.