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

Commit

Permalink
Better warning in logs when we fail to fetch an alias (matrix-org#15922)
Browse files Browse the repository at this point in the history
**Before:**
```
Error retrieving alias
```

**After:**
```
Error retrieving alias #foo:bar -> 401 Unauthorized
```

*Spawning from creating the [manual testing strategy for the outbound federation proxy](matrix-org#15773
  • Loading branch information
MadLittleMods authored and Fizzadar committed Aug 29, 2023
1 parent 5b5e981 commit 59cf034
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/15922.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add details to warning in log when we fail to fetch an alias.
4 changes: 3 additions & 1 deletion synapse/handlers/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ async def get_association(self, room_alias: RoomAlias) -> JsonDict:
except RequestSendFailed:
raise SynapseError(502, "Failed to fetch alias")
except CodeMessageException as e:
logging.warning("Error retrieving alias")
logging.warning(
"Error retrieving alias %s -> %s %s", room_alias, e.code, e.msg
)
if e.code == 404:
fed_result = None
else:
Expand Down

0 comments on commit 59cf034

Please sign in to comment.