From 4143be52d7cd958369a46b04a5cf139b5dbc5b18 Mon Sep 17 00:00:00 2001 From: Jeff Emmett <46964190+Jeff-Emmett@users.noreply.github.com> Date: Sun, 8 Dec 2024 20:41:45 -0500 Subject: [PATCH] fix video api key --- src/shapes/VideoChatShapeUtil.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/shapes/VideoChatShapeUtil.tsx b/src/shapes/VideoChatShapeUtil.tsx index 12a0329..e915292 100644 --- a/src/shapes/VideoChatShapeUtil.tsx +++ b/src/shapes/VideoChatShapeUtil.tsx @@ -99,7 +99,7 @@ export class VideoChatShape extends BaseBoxShapeUtil { method: "POST", headers: { "Content-Type": "application/json", - Authorization: `Bearer ${import.meta.env.VITE_DAILY_API_KEY}`, + Authorization: `${import.meta.env.VITE_DAILY_API_KEY}`, }, body: JSON.stringify({ properties: { @@ -122,8 +122,15 @@ export class VideoChatShape extends BaseBoxShapeUtil { if (!response.ok) { const errorData = (await response.json()) as DailyApiError + console.error("Daily API Error:", { + status: response.status, + statusText: response.statusText, + errorData, + }) throw new Error( - errorData.message || errorData.info || "Failed to create room", + errorData.message || + errorData.info || + `Failed to create room (${response.status})`, ) }