From 48a6fdd8fcd8d75af0c5a936998806f7da166a61 Mon Sep 17 00:00:00 2001 From: Chris Breuer Date: Tue, 23 Mar 2021 14:37:27 -0700 Subject: [PATCH] chore: add some additional logging --- src/Http/Controllers/IncomingWebhookController.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Http/Controllers/IncomingWebhookController.php b/src/Http/Controllers/IncomingWebhookController.php index 7576f66..1ebacd9 100644 --- a/src/Http/Controllers/IncomingWebhookController.php +++ b/src/Http/Controllers/IncomingWebhookController.php @@ -31,13 +31,20 @@ public function __invoke() Log::info('incoming MediaConvert webhook message', $message); - if (! array_key_exists('Status', $message)) { - Log::alert('incoming MediaConvert webhook: "Status"-key does not exist'); + if (! array_key_exists('detail', $message)) { + Log::alert('incoming MediaConvert webhook: "detail"-key does not exist'); return; } $detail = $message['detail']; + + if (!array_key_exists('status', $detail)) { + Log::alert('incoming MediaConvert webhook: "status"-key does not exist'); + + return; + } + $status = $detail['status']; $this->fireEventFor($status, $message);