How to capture an error message I throw using the JavaScript block

When I use the JavaScript block I want to be able to capture an error message I throw using the red error exit bubble on the JavaScript Activity. Right now whatever string I put in the throw always comes back as “error”. I do not find it desireable to save another variable in the block as an error message outside of the throw.


I would expect the console log to have the custom error message and not error.

Hello @benoates, please try using: throw Error("Some custom error message")
It should work as you are expecting.

4 Likes