fix video api key
This commit is contained in:
parent
b3cfa5b7c3
commit
4143be52d7
|
|
@ -99,7 +99,7 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
Authorization: `Bearer ${import.meta.env.VITE_DAILY_API_KEY}`,
|
Authorization: `${import.meta.env.VITE_DAILY_API_KEY}`,
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
properties: {
|
properties: {
|
||||||
|
|
@ -122,8 +122,15 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const errorData = (await response.json()) as DailyApiError
|
const errorData = (await response.json()) as DailyApiError
|
||||||
|
console.error("Daily API Error:", {
|
||||||
|
status: response.status,
|
||||||
|
statusText: response.statusText,
|
||||||
|
errorData,
|
||||||
|
})
|
||||||
throw new Error(
|
throw new Error(
|
||||||
errorData.message || errorData.info || "Failed to create room",
|
errorData.message ||
|
||||||
|
errorData.info ||
|
||||||
|
`Failed to create room (${response.status})`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue