From 6c51f8649d5b17eeb218da61583f0ca132fdd728 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 29 Oct 2024 10:09:25 +0000 Subject: [PATCH] Include the destination in the error of 'Destination mismatch' (#17830) To help debug problems such as https://github.com/element-hq/synapse/issues/17822 --- changelog.d/17830.misc | 1 + synapse/federation/transport/server/_base.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/17830.misc diff --git a/changelog.d/17830.misc b/changelog.d/17830.misc new file mode 100644 index 000000000..b2cd91c0a --- /dev/null +++ b/changelog.d/17830.misc @@ -0,0 +1 @@ +Include the destination in the error of 'Destination mismatch' on federation requests. diff --git a/synapse/federation/transport/server/_base.py b/synapse/federation/transport/server/_base.py index 9094201da..cba309635 100644 --- a/synapse/federation/transport/server/_base.py +++ b/synapse/federation/transport/server/_base.py @@ -113,7 +113,7 @@ class Authenticator: ): raise AuthenticationError( HTTPStatus.UNAUTHORIZED, - "Destination mismatch in auth header", + f"Destination mismatch in auth header, received: {destination!r}", Codes.UNAUTHORIZED, ) if (