Skip to content

Commit e784527

Browse files
authored
fix: handle potential exceptions when posting log payloads (#612)
1 parent f341cc2 commit e784527

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Logging/LogWatcher.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ public function register(): void
1919
'context' => $message->context,
2020
];
2121

22-
$this->client->post('debug/log', $payload);
22+
try {
23+
$this->client->post('debug/log', $payload);
24+
} catch (\Throwable $e) {
25+
// The server might not be running, or the connection could fail, hiding the error.
26+
}
2327
});
2428
}
2529
}

0 commit comments

Comments
 (0)