mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: explicit DSN error if invalid
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user