diff --git a/src/Controller/WatchListController.php b/src/Controller/WatchListController.php index 3accc2a..a38c4f4 100644 --- a/src/Controller/WatchListController.php +++ b/src/Controller/WatchListController.php @@ -69,7 +69,12 @@ class WatchListController extends AbstractController $transportFactoryClass = $webhookScheme->getChatTransportFactory(); /** @var AbstractTransportFactory $transportFactory */ $transportFactory = new $transportFactoryClass(); - $transportFactory->create($dsn)->send((new TestChatNotification())->asChatMessage()); + + try { + $transportFactory->create($dsn)->send((new TestChatNotification())->asChatMessage()); + } catch (\Throwable $exception) { + throw new BadRequestHttpException($exception->getMessage()); + } } } }