mirror of
https://github.com/alexjustesen/speedtest-tracker.git
synced 2026-06-23 04:20:08 +00:00
Chore: add webhook logging (#2647)
Co-authored-by: Alex Justesen <alexjustesen@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ class SendWebhookTestNotification
|
||||
'url' => url('/admin/results'),
|
||||
])
|
||||
->doNotSign()
|
||||
->dispatch();
|
||||
->dispatchSync();
|
||||
}
|
||||
|
||||
Notification::make()
|
||||
|
||||
@@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,7 @@ return [
|
||||
'webhook' => [
|
||||
'add' => 'Add webhook URLs!',
|
||||
'sent' => 'Test webhook notification sent.',
|
||||
'failed' => 'Webhook notification failed.',
|
||||
'payload' => 'Testing webhook notification',
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user