From 3fa025d19f6c773f5726168ffde4b4551c354ba0 Mon Sep 17 00:00:00 2001 From: Sven van Ginkel Date: Tue, 3 Feb 2026 14:50:33 +0100 Subject: [PATCH] Chore: add webhook logging (#2647) Co-authored-by: Alex Justesen --- .../SendWebhookTestNotification.php | 2 +- app/Listeners/LogWebhookFailure.php | 21 +++++++++++++++++++ lang/en/settings/notifications.php | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 app/Listeners/LogWebhookFailure.php diff --git a/app/Actions/Notifications/SendWebhookTestNotification.php b/app/Actions/Notifications/SendWebhookTestNotification.php index 45aa2abc..e34dcce0 100644 --- a/app/Actions/Notifications/SendWebhookTestNotification.php +++ b/app/Actions/Notifications/SendWebhookTestNotification.php @@ -42,7 +42,7 @@ class SendWebhookTestNotification 'url' => url('/admin/results'), ]) ->doNotSign() - ->dispatch(); + ->dispatchSync(); } Notification::make() diff --git a/app/Listeners/LogWebhookFailure.php b/app/Listeners/LogWebhookFailure.php new file mode 100644 index 00000000..d9884b87 --- /dev/null +++ b/app/Listeners/LogWebhookFailure.php @@ -0,0 +1,21 @@ + $event->webhookUrl, + 'error_type' => $event->errorType, + 'error_message' => $event->errorMessage, + ]); + } +} diff --git a/lang/en/settings/notifications.php b/lang/en/settings/notifications.php index 8c314553..8ccd940a 100644 --- a/lang/en/settings/notifications.php +++ b/lang/en/settings/notifications.php @@ -56,6 +56,7 @@ return [ 'webhook' => [ 'add' => 'Add webhook URLs!', 'sent' => 'Test webhook notification sent.', + 'failed' => 'Webhook notification failed.', 'payload' => 'Testing webhook notification', ], ],