You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same as #463 but specifically for automatic entry (and presumably exit) actions which are invoked automatically by the state machine / scheduler, so cannot be caught by calling code. Is the alternative to convert all actions to explicit states with internal service calls (which can fail/be rejected, and handled via state machine definition)? That seems a bit cumbersome.
Expected Result
Interpreter should have a mechanism for errors to be caught / propagate outside.
Actual Result
Error is thrown from within interpreter and cannot be handled by state machine definition.
At the moment how errors are handled in the runtime is a little bit under-specified. We are aware of the issue and we plan to address it. I've created an RFC going into more details - I would appreciate it if you could take a look at it and give feedback about those proposed changes: https://github.com/statelyai/rfcs/pull/4/files
Description
Same as #463 but specifically for automatic entry (and presumably exit) actions which are invoked automatically by the state machine / scheduler, so cannot be caught by calling code. Is the alternative to convert all actions to explicit states with internal service calls (which can fail/be rejected, and handled via state machine definition)? That seems a bit cumbersome.
Expected Result
Interpreter should have a mechanism for errors to be caught / propagate outside.
Actual Result
Error is thrown from within interpreter and cannot be handled by state machine definition.
Reproduction
Slight variant of @davydof's example on #463, but executing an automatic entry action:
https://xstate.js.org/viz/?gist=cb72b4656ce8f440b2f1704b4e33a99b
Error is thrown from within interpreter/scheduler:
xstate/packages/core/src/interpreter.ts
Line 250 in 2c094d3
xstate/packages/core/src/scheduler.ts
Line 72 in 2c094d3
The text was updated successfully, but these errors were encountered: