Chore: add webhook logging (#2647)

Co-authored-by: Alex Justesen <alexjustesen@users.noreply.github.com>
This commit is contained in:
Sven van Ginkel
2026-02-03 14:50:33 +01:00
committed by GitHub
parent 40eca53bcb
commit 3fa025d19f
3 changed files with 23 additions and 1 deletions
@@ -42,7 +42,7 @@ class SendWebhookTestNotification
'url' => url('/admin/results'),
])
->doNotSign()
->dispatch();
->dispatchSync();
}
Notification::make()
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Listeners;
use Illuminate\Support\Facades\Log;
use Spatie\WebhookServer\Events\WebhookCallFailedEvent;
class LogWebhookFailure
{
/**
* Handle the event.
*/
public function handle(WebhookCallFailedEvent $event): void
{
Log::error('Webhook notification failed', [
'url' => $event->webhookUrl,
'error_type' => $event->errorType,
'error_message' => $event->errorMessage,
]);
}
}
+1
View File
@@ -56,6 +56,7 @@ return [
'webhook' => [
'add' => 'Add webhook URLs!',
'sent' => 'Test webhook notification sent.',
'failed' => 'Webhook notification failed.',
'payload' => 'Testing webhook notification',
],
],