Treat 404 (room not found) as a success for deletion

This commit is contained in:
Lewis Wolfgang
2024-08-08 16:57:58 -04:00
parent a4761b8921
commit dd0ea674af

View File

@@ -142,7 +142,7 @@ class DailyRESTHelper:
async def delete_room_by_name(self, room_name: str) -> bool:
headers = {"Authorization": f"Bearer {self.daily_api_key}"}
async with self.aiohttp_session.delete(f"{self.daily_api_url}/rooms/{room_name}", headers=headers) as r:
if r.status != 200:
if r.status != 200 and r.status != 404:
raise Exception(f"Failed to delete room: {room_name}")
data = await r.json()