Converts this Error into a JSON-compatible map.
@override Map<String, Object?> toMap() { return {'code': code, 'message': message, 'data': data}; }