Skip to content

Commit 2cb414d

Browse files
authored
Return 500 for the case of root_room_entry being None
1 parent 976f953 commit 2cb414d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

synapse/handlers/room_summary.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,14 @@ async def _get_room_hierarchy(
204204
False,
205205
)
206206
root_room_entry = room_hierarchy[0]
207-
if not root_room_entry or not await self._is_remote_room_accessible(
207+
if not root_room_entry:
208+
raise UnstableSpecAuthError(
209+
500,
210+
"Failed to get room preview for %s"
211+
% (requested_room_id),
212+
errcode=Codes.UNKNOWN,
213+
)
214+
if not await self._is_remote_room_accessible(
208215
requester, requested_room_id, root_room_entry.room
209216
):
210217
raise UnstableSpecAuthError(

0 commit comments

Comments
 (0)