In this lecture, I'm going to show you how to use the catch Nood for the catch, Nood is able to catch
errors throughout by any node or all nodes in the same tab with the same flow, and then you can get
the error message out of it.
And processer, in this example, I'm going to print it out into the debug window.
So let's have a quick look at the documentation, because the catch note does not output a message object.
Instead, it outputs an error object.
And inside the error object, you've got attributes such as the message, which contains a complete
error message and a few other things.
So in your debug mode, you need to look for values inside the error object instead of the message object.
So here I'm grabbing the message attribute out of the error object to displayed on the debug window.
Now I'm simulating a error.
I have introduced an error in my JavaScript here and that you can see I've got my three verbose message
one, two and three.
But then in the return statement, I am returning the message for object, which of course does not
exist when I deploy this flu.
It looks so good, no error messages to be returned, but then when I trigger the function.
And their message is produced, it's quote, by the catch note passed on to the debug note and that
printed out so that I can see it message four is not defined so I can go ahead and fix it.
And redeploy now works.
So it's a good idea to keep one of those in all of your flows under each tap just in case you've caught
the functions that contain typos or errors that otherwise will not be reported.