diff --git a/packages/app-store/office365video/lib/VideoApiAdapter.ts b/packages/app-store/office365video/lib/VideoApiAdapter.ts index 6869f107ec..54faa79b60 100644 --- a/packages/app-store/office365video/lib/VideoApiAdapter.ts +++ b/packages/app-store/office365video/lib/VideoApiAdapter.ts @@ -153,6 +153,10 @@ const TeamsVideoApiAdapter = (credential: CredentialPayload): VideoApiAdapter => const resultObject = JSON.parse(resultString); + if (!resultObject.id || !resultObject.joinUrl) { + throw new HttpError({ statusCode: 500, message: "Error creating MS Teams meeting" }); + } + return Promise.resolve({ type: "office365_video", id: resultObject.id, diff --git a/packages/lib/errors.ts b/packages/lib/errors.ts index adfd8534b9..65a5ebec28 100644 --- a/packages/lib/errors.ts +++ b/packages/lib/errors.ts @@ -30,6 +30,7 @@ export async function handleErrorsJson(response: Response): Promise export function handleErrorsRaw(response: Response) { if (response.status === 204) { + console.error({ response }); return "{}"; } if (!response.ok && response.status < 200 && response.status >= 300) {