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

* fix/event-type-location-select (#5692)

* Fixed dialog components usage

* Fix styles

* Catch the error that's thrown when no api_key is found (no daily install)

Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/5795/head^2
Alex van Andel 2022-11-30 16:44:20 +00:00 committed by GitHub
parent 0e0940f5f0
commit 072ce452b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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);