diff --git a/src/python/matrix_client.py b/src/python/matrix_client.py index 56813795..178c53db 100644 --- a/src/python/matrix_client.py +++ b/src/python/matrix_client.py @@ -301,7 +301,10 @@ class MatrixClient(nio.AsyncClient): async def onErrorResponse(self, resp: nio.ErrorResponse) -> None: # TODO: show something in the client - log.warning("%s - %s", resp, json.dumps(resp.__dict__, indent=4)) + try: + log.warning("%s - %s", resp, json.dumps(resp.__dict__, indent=4)) + except Exception: + log.warning(repr(resp)) # Callbacks for nio events