1
00:00:00,750 --> 00:00:06,210
In this lecture, I'm going to show you how to use the catch Nood for the catch, Nood is able to catch

2
00:00:06,210 --> 00:00:12,290
errors throughout by any node or all nodes in the same tab with the same flow, and then you can get

3
00:00:12,630 --> 00:00:13,650
the error message out of it.

4
00:00:13,650 --> 00:00:20,420
And processer, in this example, I'm going to print it out into the debug window.

5
00:00:21,030 --> 00:00:32,150
So let's have a quick look at the documentation, because the catch note does not output a message object.

6
00:00:32,160 --> 00:00:35,160
Instead, it outputs an error object.

7
00:00:35,430 --> 00:00:40,080
And inside the error object, you've got attributes such as the message, which contains a complete

8
00:00:40,080 --> 00:00:41,940
error message and a few other things.

9
00:00:42,270 --> 00:00:53,980
So in your debug mode, you need to look for values inside the error object instead of the message object.

10
00:00:54,000 --> 00:01:00,750
So here I'm grabbing the message attribute out of the error object to displayed on the debug window.

11
00:01:01,890 --> 00:01:04,740
Now I'm simulating a error.

12
00:01:05,480 --> 00:01:12,030
I have introduced an error in my JavaScript here and that you can see I've got my three verbose message

13
00:01:12,030 --> 00:01:13,110
one, two and three.

14
00:01:13,290 --> 00:01:21,000
But then in the return statement, I am returning the message for object, which of course does not

15
00:01:21,000 --> 00:01:24,610
exist when I deploy this flu.

16
00:01:24,870 --> 00:01:31,470
It looks so good, no error messages to be returned, but then when I trigger the function.

17
00:01:32,860 --> 00:01:41,110
And their message is produced, it's quote, by the catch note passed on to the debug note and that

18
00:01:41,110 --> 00:01:46,480
printed out so that I can see it message four is not defined so I can go ahead and fix it.

19
00:01:50,850 --> 00:01:54,190
And redeploy now works.

20
00:01:54,570 --> 00:02:00,240
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

21
00:02:00,240 --> 00:02:05,760
the functions that contain typos or errors that otherwise will not be reported.
