Merge stop & error script actions (#22402)

This commit is contained in:
Franck Nijhof 2022-04-26 13:02:51 +02:00 committed by GitHub
parent 02d9817461
commit 55d225f994
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -821,10 +821,9 @@ Some of the caveats of running actions in parallel:
## Stopping a script sequence
It is possible to halt a script sequence at any point. Using the `stop` or
`error` action.
It is possible to halt a script sequence at any point. Using the `stop` action.
Both actions take a text as input explaining the reason for halting the
The `stop` action takes a text as input explaining the reason for halting the
sequence. This text will be logged and shows up in the automations and
script traces.
@ -835,11 +834,13 @@ for example, a condition is not met.
- stop: "Stop running the rest of the sequence"
```
The `error` action stops a script as well, but marks the automation
There is also an `error` option, to indicate we are stopping because of
an unexpected error. It stops the sequence as well, but marks the automation
or script as failed to run.
```yaml
- error: "Well, that was unexpected!"
- stop: "Well, that was unexpected!"
error: true
```
## Continuing on error