diff --git a/lib/tfw/components/pipe_io_event_handler.py b/lib/tfw/components/pipe_io_event_handler.py index c681567..04cb634 100644 --- a/lib/tfw/components/pipe_io_event_handler.py +++ b/lib/tfw/components/pipe_io_event_handler.py @@ -39,15 +39,9 @@ class CallbackPipeIOServer(PipeIOServer): class PipeIOEventHandler(PipeIOEventHandlerBase): def handle_event(self, message): - try: - json_bytes = dumps(message).encode() - self.pipe_io.send_message(json_bytes) - except TypeError: - LOG.error("Message %s not JSON serializable! Ignoring...", message) + json_bytes = dumps(message).encode() + self.pipe_io.send_message(json_bytes) def handle_pipe_event(self, message): - try: - json = loads(message) - self.server_connector.send(json) - except JSONDecodeError: - LOG.error("Invalid JSON received on %s! Ignoring...", self.pipe_io.in_pipe) + json = loads(message) + self.server_connector.send(json)