Skip to content

Commit

Permalink
Return 500 for the case of root_room_entry being None
Browse files Browse the repository at this point in the history
  • Loading branch information
kfiven authored Aug 27, 2024
1 parent 976f953 commit 2cb414d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion synapse/handlers/room_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,14 @@ async def _get_room_hierarchy(
False,
)
root_room_entry = room_hierarchy[0]
if not root_room_entry or not await self._is_remote_room_accessible(
if not root_room_entry:
raise UnstableSpecAuthError(
500,
"Failed to get room preview for %s"
% (requested_room_id),
errcode=Codes.UNKNOWN,
)
if not await self._is_remote_room_accessible(
requester, requested_room_id, root_room_entry.room
):
raise UnstableSpecAuthError(
Expand Down

0 comments on commit 2cb414d

Please sign in to comment.