Add conditional if response received from graph api v1 was empty (#5573)
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>pull/5576/head
parent
e7f557f7f9
commit
cb96b12108
|
@ -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,
|
||||
|
|
|
@ -30,6 +30,7 @@ export async function handleErrorsJson<Type>(response: Response): Promise<Type>
|
|||
|
||||
export function handleErrorsRaw(response: Response) {
|
||||
if (response.status === 204) {
|
||||
console.error({ response });
|
||||
return "{}";
|
||||
}
|
||||
if (!response.ok && response.status < 200 && response.status >= 300) {
|
||||
|
|
Loading…
Reference in New Issue