From 098950938e4764b9ebe1bd762ef41abdcd2b82fd Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Sun, 8 Jun 2025 17:59:01 +0200 Subject: [PATCH] fix: handle potential exceptions when posting log payloads --- src/Logging/LogWatcher.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Logging/LogWatcher.php b/src/Logging/LogWatcher.php index e48eaf4..2937848 100644 --- a/src/Logging/LogWatcher.php +++ b/src/Logging/LogWatcher.php @@ -19,7 +19,11 @@ public function register(): void 'context' => $message->context, ]; - $this->client->post('debug/log', $payload); + try { + $this->client->post('debug/log', $payload); + } catch (\Throwable $e) { + // The server might not be running, or the connection could fail, hiding the error. + } }); } }