Error thrown by WizardBuilder.run when a step's items/value/
validate callback (or a branch() function) throws or rejects.
Cancellation — Escape, back, losing focus — never throws; only a genuinely
unexpected failure does. A caller therefore branches on the returned outcome
for "the user gave up" and catches only for "something broke", rather than
having to tell those two apart inside one catch. error.cause holds the
original error.
The state snapshot is deliberately not carried: wizard state may contain
secrets, and an error object travels further than the wizard's caller. The
original cause may still contain callback-provided sensitive text; redact
it before sending the error to telemetry or a user-facing report.
Error thrown by WizardBuilder.run when a step's
items/value/validatecallback (or abranch()function) throws or rejects. Cancellation — Escape, back, losing focus — never throws; only a genuinely unexpected failure does. A caller therefore branches on the returned outcome for "the user gave up" and catches only for "something broke", rather than having to tell those two apart inside onecatch.error.causeholds the original error.The state snapshot is deliberately not carried: wizard state may contain secrets, and an error object travels further than the wizard's caller. The original
causemay still contain callback-provided sensitive text; redact it before sending the error to telemetry or a user-facing report.