Error Surfaces
| Surface | Where it appears | Recommended response |
|---|---|---|
| Setup error | Provider, hook, or SDK initialization | Show a fallback panel and report a sanitized app log. |
| Action error | Start, reroute, enter, book, leave, or reenter action | Keep the current UI visible, disable duplicate submits, and offer retry when appropriate. |
| Gated state | JourneyView with journeyStage === "gated" | Render the required customer input with generic copy. |
| Denied or unavailable state | Routed sequence view | Explain the outcome without inferring private reasons. |
| Handoff error | Your admission or checkout endpoint | Keep the customer on a recoverable page and retry through your own app boundary. |
React Widget Errors
ExperienceWidget exposes onError for adapter and action errors. Use it for app-owned logging and customer support signals.
Custom React UI
When you useuseExperienceJourney, branch on the hook error and on the current public view.
Core SDK Actions
Headless integrations should catch errors at the action boundary.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.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.
- 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:| Situation | Good copy |
|---|---|
| Network failure | ”We could not update your status. Please try again.” |
| Gated state | ”Complete this step to continue.” |
| Denied state | ”This experience is not available for this session.” |
| Handoff failure | ”Checkout is not ready yet. Please try again.” |
| Ended or unavailable | ”This experience is no longer available.” |
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.