# XState 6.0.0-alpha.16 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2026-07-02 - Version: 6.0.0-alpha.16 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%406.0.0-alpha.16 - Permalink: https://whatsnew.fyi/product/xstate/releases/6.0.0-alpha.16 - Labels: Pre-release What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Add state-level onError transitions for handling xstate.error.* events, with the caught error available on event.error - **changed** — Allow machines with no external events to be used anywhere AnyActorLogic or AnyStateMachine is expected ###### Minor Changes - e410f24: Add state-level `onError` transitions for handling `xstate.error.*` events. State `onError` catches actor, execution, and communication errors while the state is active. The caught error is available on `event.error`. ```ts const machine = createMachine({ initial: 'active', states: { active: { onError: ({ event }) => ({ target: 'failed', context: { message: event.error instanceof Error ? event.error.message : String(event.error) } }) }, failed: {} } }); ``` ###### Patch Changes - f6edec7: Allow machines with no external events to be used anywhere `AnyActorLogic` or `AnyStateMachine` is expected. ```ts const machine = setup({ schemas: { events: {} } }).createMachine({}); const logic: AnyActorLogic = machine; const anyMachine: AnyStateMachine = machine; ``` Machines with empty event schemas still reject external events sent to their actors.