diff --git a/src/Listeners/SendResourceLifecycleWebhook.php b/src/Listeners/SendResourceLifecycleWebhook.php index 9ee5863..fc3dfd0 100644 --- a/src/Listeners/SendResourceLifecycleWebhook.php +++ b/src/Listeners/SendResourceLifecycleWebhook.php @@ -119,7 +119,7 @@ public function handle($event) 'api_event_uuid' => $apiEvent->uuid, 'method' => $request->getMethod(), 'status_code' => $exception->getStatusCode(), - 'reason_phrase' => $response->getReasonPhrase() ?? $exception->getMessage(), + 'reason_phrase' => $response->getReasonPhrase(), 'duration' => $durationStart->diffInSeconds(now()), 'url' => $request->getUri(), 'attempt' => 1, @@ -127,7 +127,8 @@ public function handle($event) 'status' => 'failed', 'headers' => $request->getHeaders(), 'meta' => [ - 'exception' => get_class($exception), + 'exception' => get_class($exception), + 'exception_message' => $exception->getMessage(), ], 'sent_at' => $durationStart, ];