Stefan
Stefan

Reputation: 12360

How to show/handle errors thrown while running JavaScript flow actions in Power Automate Desktop?

The documentation about script actions states, that a variable ScriptError is produced:

https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/scripting#variables-produced-2

However, when trying to display that Variable using a Display message flow action or Set variable flow action, I get the error

Variable 'ScriptError' does not exist.

I also tried the flow action On block error to handle errors thrown by a JavaScript/JScript action. The script runs silently without showing any error.

=> How to show/handle errors for script actions in Power Automate Desktop?

Related:

How to return result from JavaScript action in Power Automate Desktop?

Upvotes: 0

Views: 411

Answers (1)

Stefan
Stefan

Reputation: 12360

The variable %ScriptError% is disabled by default. Once it has been enabled in the section Variables produced of the options, it can be used as expected:

enter image description here

Upvotes: 0

Related Questions