From 3371d5e02b745d6953a041af6bcb4776b307bdde Mon Sep 17 00:00:00 2001 From: RyanSwanson Date: Thu, 16 Jan 2025 14:16:27 -0700 Subject: [PATCH] fix: Only error when we verify they're using a disposable domain. --- pkg/cli/email/validate.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cli/email/validate.go b/pkg/cli/email/validate.go index 13a7c8a162..566932c711 100644 --- a/pkg/cli/email/validate.go +++ b/pkg/cli/email/validate.go @@ -68,25 +68,25 @@ func Validate(emailAddress string, options ...Option) error { func checkDisposableDomains(domain string) error { fb, err := domainsZip.ReadFile("disposable_domains.zip") if err != nil { - return err + return nil } zipReader, err := zip.NewReader(bytes.NewReader(fb), int64(len(fb))) if err != nil { - return fmt.Errorf("failed to read disposable domains list for verification: %w", err) + return nil } for _, file := range zipReader.File { if file.Name == "disposable_domains.json" { f, err := file.Open() if err != nil { - return err + return nil } defer f.Close() var domains []string if err := json.NewDecoder(f).Decode(&domains); err != nil { - return fmt.Errorf("disposable domains list improperly formatted: %w", err) + return nil } if slices.Contains(domains, domain) {