| 332 | } |
| 333 | |
| 334 | func (f *customDomainResourceFetcher) FetchData(ctx context.Context) (importDataList, error) { |
| 335 | var data importDataList |
| 336 | |
| 337 | customDomains, err := f.api.CustomDomain.List(ctx) |
| 338 | if err != nil { |
| 339 | errNotEnabled := []string{ |
| 340 | "The account is not allowed to perform this operation, please contact our support team", |
| 341 | "There must be a verified credit card on file to perform this operation", |
| 342 | } |
| 343 | |
| 344 | for _, e := range errNotEnabled { |
| 345 | if strings.Contains(err.Error(), e) { |
| 346 | return data, nil |
| 347 | } |
| 348 | } |
| 349 | return nil, err |
| 350 | } |
| 351 | |
| 352 | for _, domain := range customDomains { |
| 353 | data = append(data, importDataItem{ |
| 354 | ResourceName: "auth0_custom_domain." + sanitizeResourceName(domain.GetDomain()), |
| 355 | ImportID: domain.GetID(), |
| 356 | }) |
| 357 | } |
| 358 | |
| 359 | return data, nil |
| 360 | } |
| 361 | |
| 362 | func (f *emailProviderResourceFetcher) FetchData(ctx context.Context) (importDataList, error) { |
| 363 | _, err := f.api.EmailProvider.Read(ctx) |