Skip to main content
Good error handling keeps customers oriented without exposing private routing or enforcement details. Treat the SDK view as the public source of truth, show customer-safe recovery copy, and keep sensitive values out of logs.

Error Surfaces

React Widget Errors

ExperienceWidget exposes onError for adapter and action errors. Use it for app-owned logging and customer support signals.
Do not attach admission grants or raw journey snapshots to third-party error reports.

Custom React UI

When you use useExperienceJourney, branch on the hook error and on the current public view.
For action handlers, disable the submitted control while the promise is pending and keep the last known view rendered if the action fails.

Core SDK Actions

Headless integrations should catch errors at the action boundary.
Only show controls for actions on the current JourneyView or SequenceView. If the action is not present, the UI should not offer it.

Admission Handoff Failures

When an admitted customer moves to checkout, your app owns the handoff error path.
Keep server responses contract-focused. Return a customer-safe status or retry instruction rather than private routing details.

Logging Guidelines

Log enough to diagnose your application boundary:
  • Experience ID.
  • High-level public state name.
  • Your route, release, and request ID.
  • Sanitized error name and message.
  • Whether the handoff was attempted.
Avoid logging:
  • Admission grants.
  • Raw journey snapshots.
  • Customer verification inputs.
  • Private assumptions about routing or enforcement.

Customer Copy

Prefer copy that explains what the customer can do next: Avoid copy that claims why a customer was routed or denied unless that reason is part of your public customer experience.

Testing

  • Render every public state your UI handles.
  • Force action promises to reject in app-boundary tests.
  • Confirm retry controls call the current view action.
  • Confirm telemetry redacts grants and snapshots.
  • Confirm server handoff failures keep the customer in a recoverable flow.
For examples of controlled app-boundary tests, see Testing Your Integration.