Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit ae391db

Browse files
Better warning in logs when we fail to fetch an alias (#15922)
**Before:** ``` Error retrieving alias ``` **After:** ``` Error retrieving alias #foo:bar -> 401 Unauthorized ``` *Spawning from creating the [manual testing strategy for the outbound federation proxy](#15773
1 parent d7fc87d commit ae391db

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changelog.d/15922.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add details to warning in log when we fail to fetch an alias.

synapse/handlers/directory.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ async def get_association(self, room_alias: RoomAlias) -> JsonDict:
277277
except RequestSendFailed:
278278
raise SynapseError(502, "Failed to fetch alias")
279279
except CodeMessageException as e:
280-
logging.warning("Error retrieving alias")
280+
logging.warning(
281+
"Error retrieving alias %s -> %s %s", room_alias, e.code, e.msg
282+
)
281283
if e.code == 404:
282284
fed_result = None
283285
else:

0 commit comments

Comments
 (0)