diff --git a/src/api/client_server/room.rs b/src/api/client_server/room.rs
index 5f62e9fa..128f84f9 100644
--- a/src/api/client_server/room.rs
+++ b/src/api/client_server/room.rs
@@ -146,7 +146,8 @@ pub async fn create_room_route(
                         })?,
                     );
                 }
-                _ => {} // V11 removed the "creator" key
+                RoomVersionId::V11 => {} // V11 removed the "creator" key
+                _ => panic!("Unexpected room version {}", room_version),
             }
 
             content.insert(
@@ -170,7 +171,8 @@ pub async fn create_room_route(
                 | RoomVersionId::V8
                 | RoomVersionId::V9
                 | RoomVersionId::V10 => RoomCreateEventContent::new_v1(sender_user.clone()),
-                _ => RoomCreateEventContent::new_v11(),
+                RoomVersionId::V11 => RoomCreateEventContent::new_v11(),
+                _ => panic!("Unexpected room version {}", room_version),
             };
             let mut content = serde_json::from_str::<CanonicalJsonObject>(
                 to_raw_value(&content)
@@ -627,10 +629,11 @@ pub async fn upgrade_room_route(
                 })?,
             );
         }
-        _ => {
+        RoomVersionId::V11 => {
             // "creator" key no longer exists in V11 rooms
             create_event_content.remove("creator");
         }
+        _ => panic!("Unexpected room version {}", body.new_version)
     }
     create_event_content.insert(
         "room_version".into(),
diff --git a/src/service/admin/mod.rs b/src/service/admin/mod.rs
index 292943a3..08b6e621 100644
--- a/src/service/admin/mod.rs
+++ b/src/service/admin/mod.rs
@@ -944,7 +944,8 @@ impl Service {
             | RoomVersionId::V8
             | RoomVersionId::V9
             | RoomVersionId::V10 => RoomCreateEventContent::new_v1(conduit_user.clone()),
-            _ => RoomCreateEventContent::new_v11(),
+            RoomVersionId::V11 => RoomCreateEventContent::new_v11(),
+            _ => panic!("Unexpected room version {}", room_version),
         };
         content.federate = true;
         content.predecessor = None;
diff --git a/src/service/rooms/timeline/mod.rs b/src/service/rooms/timeline/mod.rs
index b0f6cb5e..d0943c9a 100644
--- a/src/service/rooms/timeline/mod.rs
+++ b/src/service/rooms/timeline/mod.rs
@@ -399,7 +399,7 @@ impl Service {
                             self.redact_pdu(redact_id, pdu)?;
                         }
                     }
-                    _ => {
+                    RoomVersionId::V11 => {
                         #[derive(Deserialize)]
                         struct Redaction {
                             redacts: Option<OwnedEventId>,
@@ -412,6 +412,7 @@ impl Service {
                             self.redact_pdu(redact_id, pdu)?;
                         }
                     }
+                    _ => panic!("Unexpected room version {}", room_version_id)
                 };
             }
             TimelineEventType::SpaceChild => {