xstate icon indicating copy to clipboard operation
xstate copied to clipboard

Bug: when using invoked actors in a top-level final state, error should be shown

Open hgezim opened this issue 2 years ago • 1 comments

Description

I spent a lot of time debugging this issue. Had a final state with an invoked actor. It would start executing the invoked actor but not report any errors to onError.

Expected result

To see a warning or an error

Actual result

It let me shoot myself in the foot for a couple hours straight.

Reproduction

https://stately.ai/viz/42973d38-455d-44d5-93a9-8a8d323d5283

Additional context

No response

hgezim avatar Apr 10 '23 17:04 hgezim

You're right; final states should not have invoked actors, which matches the SCXML spec: https://www.w3.org/TR/scxml/#final

We should warn against this and/or disallow this in v5.

davidkpiano avatar Apr 11 '23 00:04 davidkpiano