diff --git a/platypush/message/__init__.py b/platypush/message/__init__.py index 67c4efe69..480fb1823 100644 --- a/platypush/message/__init__.py +++ b/platypush/message/__init__.py @@ -78,6 +78,9 @@ class Message: if isinstance(obj, Enum): return obj.value + if isinstance(obj, Exception): + return f'<{obj.__class__.__name__}>' + (f' {obj}' if obj else '') + if is_dataclass(obj): return asdict(obj)