From 55d225f994a267b718dd96fc69e7a91ef729840c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 26 Apr 2022 13:02:51 +0200 Subject: [PATCH] Merge stop & error script actions (#22402) --- source/_docs/scripts.markdown | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/_docs/scripts.markdown b/source/_docs/scripts.markdown index 65646ffd921..72999165ac1 100644 --- a/source/_docs/scripts.markdown +++ b/source/_docs/scripts.markdown @@ -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