From b29e3151a45e64b69b60b7f77758516e419fae07 Mon Sep 17 00:00:00 2001 From: Pablo Veintimilla Date: Mon, 8 Apr 2024 13:08:04 -0500 Subject: [PATCH] Fix control of unknown type notification --- EventSubscriber/CallbackSubscriber.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/EventSubscriber/CallbackSubscriber.php b/EventSubscriber/CallbackSubscriber.php index a3c2b3b..ed380aa 100644 --- a/EventSubscriber/CallbackSubscriber.php +++ b/EventSubscriber/CallbackSubscriber.php @@ -144,9 +144,8 @@ public function processJsonPayload(string $type, $message = ''): void $this->processBounce(); break; default: - $message = 'Received SES webhook of type ' . $this->payload['Type'] . " but couldn't understand payload"; - $this->logger->warning($message); - $this->logger->debug('SES webhook payload: ' . json_encode($this->payload)); + $message = "Received SES webhook of type: $type but couldn't understand payload: "; + $this->logger->error($message . json_encode($this->payload)); throw new BadRequestHttpException($message); } }