Include the destination in the error of 'Destination mismatch' (#17830)

To help debug problems such as
https://github.com/element-hq/synapse/issues/17822
This commit is contained in:
Erik Johnston 2024-10-29 10:09:25 +00:00 committed by GitHub
parent 69e9b75373
commit 6c51f8649d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

1
changelog.d/17830.misc Normal file
View file

@ -0,0 +1 @@
Include the destination in the error of 'Destination mismatch' on federation requests.

View file

@ -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 (