Skip to content

Commit

Permalink
Add error checking code
Browse files Browse the repository at this point in the history
  • Loading branch information
ebanner committed May 7, 2024
1 parent 9bc6788 commit 44316ea
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions functions/zoom-meeting-webhook-handler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 44316ea

Please sign in to comment.