toJson method
Serializes this
as a JSON object.
Implementation
@override
Map<String, Object?> toJson() => {
'message': message,
if (recoverySuggestion != null)
'recoverySuggestion': recoverySuggestion,
if (underlyingException != null)
'underlyingException': underlyingException.toString(),
};