Skip to content

fix(storefront-app): show backend user_message on any checkout error, not only CKT901 - #1324

Merged
leomp12 merged 3 commits into
masterfrom
fix/checkout-user-message
Oct 12, 2026
Merged

leomp12 merged 3 commits into
masterfrom
fix/checkout-user-message

Conversation

@leomp12

@leomp12 leomp12 commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Checkout.js checkout() catch now shows the backend user_message (warning toast) for the new customer-facing checkout gate errors: CKT503, CKT802, CKT804, CKT805, CKT806, only when user_message is present.
  • CKT901 behavior is unchanged (toast + skipShippingApps.push), with or without user_message.
  • Every other error keeps the generic i19paymentError toast, as on master.

Why

cloud-commerce#837 added opt-in wholesale (customers-only) checkout gates that respond with error_code + user_message. Today those fall into the generic "payment error, try another payment method" toast.

An explicit allowlist (instead of "any user_message") is required to avoid regressions: existing errors already carry user_message — e.g. CKT704 on gateway rejection ("order saved, please contact us") and the legacy modules-api default "unexpected error" message — and must keep the payment-error guidance. The user_message guard also keeps the pre-existing CKT802 (disabled customer, no message) on the generic toast.

After release, bump @ecomplus/storefront-app in cloud-commerce packages/storefront/src/lib/scripts/vbeta-app.ts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TfDpM623CXFB6wADGxdC9B

leomp12 and others added 3 commits October 12, 2026 15:08
…r, not only CKT901

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfDpM623CXFB6wADGxdC9B
…customer-facing error codes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfDpM623CXFB6wADGxdC9B
@leomp12
leomp12 merged commit 144464b into master Oct 12, 2026
5 checks passed
@leomp12
leomp12 deleted the fix/checkout-user-message branch October 12, 2026 19:15
leomp12 added a commit to ecomplus/cloud-commerce that referenced this pull request Oct 12, 2026
…d of a payment error

Update default storefront-app to 2.0.0-beta.230, which displays the
`user_message` sent by checkout gates (CKT503, CKT802, CKT804, CKT805,
CKT806) instead of the generic payment error toast.

See ecomplus/storefront#1324 and #837.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017kuaEjP8yica7GhL6jeyZQ
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.

1 participant