successful()) { $this->settings?->recordDeliverySuccess(); return; } if ($response->status() === 429 || $response->serverError()) { throw new RuntimeException("{$channel} notification failed with {$response->status()} status code."); } // The response body is never part of the reason: it can echo tokens or webhook secrets. $reason = "{$channel} returned HTTP {$response->status()} (".(HttpResponse::$statusTexts[$response->status()] ?? 'Client Error').').'; if ($isConfigurationError) { $this->settings?->recordDeliveryFailure($reason); return; } Log::warning("{$channel} rejected the notification", ['reason' => $reason]); } }