diff --git a/platypush/message/__init__.py b/platypush/message/__init__.py index 67c4efe696..480fb18239 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)