Map<String, dynamic> toMap() { return { 'errorCode': errorCode?.value, 'subErrorCodes': subErrorCodes?.map((e) => e.value).toList(), }; }