From dd0ea674af053a79d89de0ded11e35364e69603b Mon Sep 17 00:00:00 2001 From: Lewis Wolfgang Date: Thu, 8 Aug 2024 16:57:58 -0400 Subject: [PATCH] Treat 404 (room not found) as a success for deletion --- src/pipecat/transports/services/helpers/daily_rest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/transports/services/helpers/daily_rest.py b/src/pipecat/transports/services/helpers/daily_rest.py index 54510ff2c..fd47e939f 100644 --- a/src/pipecat/transports/services/helpers/daily_rest.py +++ b/src/pipecat/transports/services/helpers/daily_rest.py @@ -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()