Skip to content

Scheduling infrastructure for absolutely everyone.

Catch the error that's thrown when no api_key is found (no daily) (#5696)

Alex van Andel072ce452b707
diff --git a/packages/core/videoClient.ts b/packages/core/videoClient.ts
index edec7f0553a..f9d1e3e88f7 100644
--- a/packages/core/videoClient.ts
+++ b/packages/core/videoClient.ts
@@ -134,13 +134,19 @@ const deleteMeeting = (credential: CredentialPayload, uid: string): Promise<unkn
// @TODO: This is a temporary solution to create a meeting with cal.com video as fallback url
const createMeetingWithCalVideo = async (calEvent: CalendarEvent) => {
+ let dailyAppKeys: Awaited<ReturnType<typeof getDailyAppKeys>>;
+ try {
+ dailyAppKeys = await getDailyAppKeys();
+ } catch (e) {
+ return;
+ }
const [videoAdapter] = getVideoAdapters([
{
id: 0,
appId: "daily-video",
type: "daily_video",
userId: null,
- key: await getDailyAppKeys(),
+ key: dailyAppKeys,
},
]);
return videoAdapter?.createMeeting(calEvent);