 In this lesson, let's test what happens when a flow fails. So here you can see this flow I already demonstrated how we can create. So there was a use case we need to create related opportunity on account. So for that, this screen is created which is receiving opportunity name and close date. Then one more screen is there which will receive stays name. And then one more element that is create opportunity and here everything is mapped. So sometimes it happens like you forgot to map particular field and that field is required on the object, right? So due to that, there will be some errors. So I just removed that stage and so that stage is removed and now I'm going to save as this flow. So I will be testing it through two ways. One, I will be clicking on the debug and you will see one email will be triggered and then I will be running this from the UI. So I'm just clicking on debug. So here we need to provide the record ID. So I'm just going to fetch ID of particular account. Now I'm clicking on run. So here we need to pass the opportunity name then we need to select the close date and then we need to select the stays name. Now I'm clicking on next. So here you can see this error message. It is saying an unhandled fault has occurred in this flow and unhandled fault has occurred by processing the flow. Please contact your administrator for more information. Now here if you go to the debug end at the end so it will show you like why error came and which element failed. So wherever any particular element is failing so their execution of flow will stop. So you can see create record element is failing because here the stays is not mapping to create the opportunity and stays is required field. So here it is also mentioned, right? Now if you go to your email ID so the user who last modified the flow that user will be receiving an email. So you can see this email is available here. So with the help of this email you will be able to debug, right? So here also you can see this error message is available and here it is showing this create record element failed. Now suppose you activated this and you are just executing this from the UI. So here this opportunity flow is placed on the count record base. So if I try to create a opportunity from here. So here also you will see that error message, right? So now you don't have any debug. So the only option is to check that email. So you need to go to your email ID and you need to check the email ID, right? So here that error is available, right? So this way if your flow fails so with the help of that email you can test. If you have not modified the flow but you are testing and you are getting, you are not receiving the emails. So what you can do, you can just go to set up home and you can search for Apex exception email and what you can do here, you can provide your email. So you can set external email address or you can add Salesforce user as well. So wherever you want to throw that exception email so you can add and you can save it. So this way also you can add external email addresses or you can add Salesforce users if they have not modified the flow. So this way I hope you understood how we can check why flow is failing and how to debug that.