We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4f5626 commit bdd62b9Copy full SHA for bdd62b9
src/Server.php
@@ -66,7 +66,15 @@ public function connect(TransportInterface $transport): void
66
}
67
68
foreach ($this->notificationPublisher->flush() as $notification) {
69
- $transport->send($notification);
+ try {
70
+ $transport->send(json_encode($notification, \JSON_THROW_ON_ERROR));
71
+ } catch (\JsonException $e) {
72
+ $this->logger->error('Failed to encode notification to JSON.', [
73
+ 'notification' => $notification::class,
74
+ 'exception' => $e,
75
+ ]);
76
+ continue;
77
+ }
78
79
80
usleep(1000);
0 commit comments