Skip to content

Commit

Permalink
chore: add some additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Mar 23, 2021
1 parent e192947 commit 48a6fdd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Http/Controllers/IncomingWebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 48a6fdd

Please sign in to comment.