Nomination Flow Diagnostic
Test the complete nomination submission end-to-end
Development Only — Complete Flow Analysis
ROOT CAUSE IDENTIFIED
SENDER DOMAIN NOT VERIFIED
The nomination email function sends from noreply@8point0.vote
Resend rejects emails from unverified sender domains. The domain 8point0.vote is not currently verified in the Resend account.
DIAGNOSTIC FIX APPLIED
For development/testing:
- ✓ Edge function now uses
onboarding@resend.dev(Resend verified sender) - ✓ Enhanced error messages show actual failure reason instead of "An error occurred"
- ✓ Backend logs each diagnostic stage with timestamps
- ✓ Frontend displays safe diagnostic errors to help debugging
COMPLETE NOMINATION FLOW STAGES
Form Submit Handler
Frontend detects form submission, validates inputs
Generate Invitation Token
Create secure random token for nomination acceptance
Database Insert - Nominations Table
Insert nominee record with token, status=pending
Email - send-nomination-email Edge Function
THIS STAGE WAS FAILING - now using verified sender
Resend API Call
POST to api.resend.com with email parameters
Return to Frontend
Show success message or diagnostic error
TEST THE FIX
- Navigate to /hamilton#mayor
- Click "NOMINATE SOMEONE" button
- Enter test nominee name and email address
- Click "SEND NOMINATION"
- Watch for either:
- ✓ Success: "Nomination sent!" message
- ✗ Failure: Detailed error message showing exact failure point
EXPECTED OUTCOMES
✓ SUCCESS PATH:
Nomination record created → Email sent from onboarding@resend.dev → Resend accepts → Frontend shows "Nomination sent!"
✗ FAILURE PATH (if any):
Frontend displays specific error like "Email service returned 403: sender domain not verified"
IMPORTANT NOTES
- TEMPORARY: The edge function is using onboarding@resend.dev for development testing only
- NEXT STEP: Once this diagnostic passes, configure and verify 8point0.vote domain in Resend account
- PRODUCTION: Will update the function to use the verified production domain
- RESEND KEY: Already verified working via standalone test