site-mva-global-fret/cloudflare-worker
Serge RAKOTO HARRY-NAIVO a2dd183b79 fix(worker): replace Forms API submission with CRM API direct
Forms API (api.hsforms.com/submissions/v3/integration/submit/...) can
return 200 OK without actually creating a contact in HubSpot \xe2\x80\x94 silent
failures triggered by anti-spam filters, form configuration, or whatever
state the form GUID was left in.

Symptom in production: E2E flow completes (welcome email sent with
ref MVA-005), but contact is never created in HubSpot CRM. Reproduced
with serge+test1@mind4solutions.com on 2026-05-07.

Fix: switch to direct CRM API POST /crm/v3/objects/contacts which is
deterministic (= returns 409 if exists, error otherwise). Falls back to
PATCH on 409 to handle duplicate-email reinscriptions.

Refs: WordPress \xe2\x86\x92 static migration, post-Phase F bugfix.
2026-05-07 15:10:03 +02:00
..
.gitignore refactor(worker): Brevo+EmailJS ? Resend + remove cron + fix github.io URLs (#3) 2026-05-07 15:27:41 +03:00
DEPLOIEMENT.md refactor(worker): Brevo+EmailJS ? Resend + remove cron + fix github.io URLs (#3) 2026-05-07 15:27:41 +03:00
hubspot-proxy.js fix(worker): replace Forms API submission with CRM API direct 2026-05-07 15:10:03 +02:00
wrangler.toml refactor(worker): Brevo+EmailJS ? Resend + remove cron + fix github.io URLs (#3) 2026-05-07 15:27:41 +03:00