Skip to content

fix: handle domain fetch failure without defaulting to onboarding sender#230

Draft
bukinoshita wants to merge 1 commit intomainfrom
fix/domain-fallback-send-0f26
Draft

fix: handle domain fetch failure without defaulting to onboarding sender#230
bukinoshita wants to merge 1 commit intomainfrom
fix/domain-fallback-send-0f26

Conversation

@bukinoshita
Copy link
Copy Markdown
Member

@bukinoshita bukinoshita commented Apr 9, 2026

Summary by cubic

Fix interactive sends so a domain fetch failure no longer defaults to onboarding@resend.dev. We now warn and require an explicit From address, and paginate domain listing to find all verified sending domains. Resolves BU-613.

  • Bug Fixes

    • fetchVerifiedDomains returns null on API errors or exceptions to distinguish failure from “no domains”.
    • emails send and broadcasts create warn on failure and prompt for From without a default.
    • Tests updated to expect null on failures.
  • New Features

    • Added pagination using has_more/after to collect all verified sending domains.
    • Extracted the verified, sending-enabled filter for clarity.

Written for commit 9907675. Summary will update on new commits.

- Change fetchVerifiedDomains to return null on error instead of [],
  distinguishing 'no verified domains' from 'fetch failed'
- Add pagination support to fetchVerifiedDomains using recursive
  page collection via has_more/after cursors
- When domain fetch fails in emails send, warn the user and prompt
  for an explicit sender address without pre-filling onboarding@resend.dev
- Apply the same fix to broadcasts create command
- Add comprehensive tests for fetchVerifiedDomains covering pagination,
  error handling, and domain filtering

Resolves BU-613

Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants