diff --git a/lib/tfw/components/pipe_io_event_handler.py b/lib/tfw/components/pipe_io_event_handler.py index d610f4f..7604787 100644 --- a/lib/tfw/components/pipe_io_event_handler.py +++ b/lib/tfw/components/pipe_io_event_handler.py @@ -23,8 +23,12 @@ class PipeIOEventHandler(EventHandlerBase): self._pipe_io_server.stop() def handle_event(self, message): - json_bytes = dumps(message).encode() - self._pipe_io_server.send_message(json_bytes) + try: + json_bytes = dumps(message).encode() + self._pipe_io_server.send_message(json_bytes) + except TypeError: + LOG.error("Message %s not JSON serializable! Ignoring...", message) + class JSONProxyPipeIOServer(PipeIOServer):