From 2e9b3627384fb52fe3bb17476baa05335983c4cf Mon Sep 17 00:00:00 2001 From: Edward Banner Date: Tue, 7 May 2024 10:35:47 -0400 Subject: [PATCH] Add error checking code --- functions/zoom-meeting-webhook-handler/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/zoom-meeting-webhook-handler/index.js b/functions/zoom-meeting-webhook-handler/index.js index 7fa738f..4ae7300 100644 --- a/functions/zoom-meeting-webhook-handler/index.js +++ b/functions/zoom-meeting-webhook-handler/index.js @@ -105,6 +105,10 @@ const handler = async function (event, context) { body: event.body, }); + if (!response.ok) { + throw new Error(`Error: ${response.status} ${response.statusText}`); + } + console.log('EXITING IMMEDIATELY FROM zoom-meeting-webhook-handler') break;