about summary refs log tree commit diff
path: root/Tests/LibMatrix.HomeserverEmulator/Controllers/Rooms/RoomStateController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LibMatrix.HomeserverEmulator/Controllers/Rooms/RoomStateController.cs')
-rw-r--r--Tests/LibMatrix.HomeserverEmulator/Controllers/Rooms/RoomStateController.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/LibMatrix.HomeserverEmulator/Controllers/Rooms/RoomStateController.cs b/Tests/LibMatrix.HomeserverEmulator/Controllers/Rooms/RoomStateController.cs
index a1738c9..74c70a3 100644
--- a/Tests/LibMatrix.HomeserverEmulator/Controllers/Rooms/RoomStateController.cs
+++ b/Tests/LibMatrix.HomeserverEmulator/Controllers/Rooms/RoomStateController.cs
@@ -64,11 +64,14 @@ public class RoomStateController(ILogger<RoomStateController> logger, TokenServi
             };
 
         var stateEvent = room.State.FirstOrDefault(x => x.Type == eventType && x.StateKey == stateKey);
-        if (stateEvent == null)
+        if (stateEvent == null) {
+            Console.WriteLine($"Event not found in room {roomId} matching {eventType}/{stateKey}");
             throw new MatrixException() {
                 ErrorCode = "M_NOT_FOUND",
                 Error = "Event not found"
             };
+        }
+
         // return stateEvent;
         return format == "event" ? stateEvent : stateEvent.RawContent;
     }