diff --git a/functions/zoom-meeting-webhook-handler/index.js b/functions/zoom-meeting-webhook-handler/index.js index 7fa738f..c4279cf 100644 --- a/functions/zoom-meeting-webhook-handler/index.js +++ b/functions/zoom-meeting-webhook-handler/index.js @@ -100,10 +100,18 @@ const handler = async function (event, context) { case EVENT_PARTICIPANT_LEFT: console.log('CALLING handle-participant-joined-left-background') - response = await fetch(`${APP_HOST}/handle-participant-joined-left-background`, { - method: 'POST', - body: event.body, - }); + try { + response = await fetch(`${APP_HOST}/handle-participant-joined-left-background`, { + method: 'POST', + body: event.body, + }); + + if (!response.ok) { + console.error(`Error: ${response.status} ${response.statusText}`); + } + } catch (error) { + console.error(error); + } console.log('EXITING IMMEDIATELY FROM zoom-meeting-webhook-handler')