--- title: "Web scraping errors: Perform a new set of actions when an error occurs" slug: "perform-a-new-set-of-actions-when-an-error-occurs" description: "In case your agent encounters an error while it's processing a web page—usually, the Element Not Found error—you can configure the agent to run a different set of actions, rather than just stopping. " tags: ["new steps", "different pages", "execute", "implement", "change in format", "format", "troubleshooting", "another", "redo", "change"] updated: 2024-05-14T14:03:46Z published: 2024-05-14T14:03:46Z canonical: "help.mozenda.com/perform-a-new-set-of-actions-when-an-error-occurs" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.mozenda.com/llms.txt > Use this file to discover all available pages before exploring further. # Perform a new set of actions when an error occurs In case your agent encounters an error while it's processing a web page—usually the *Element Not Found* error—you can configure the agent to run a different set of actions, rather than just stopping. This is especially useful when harvesting data from websites that use different layouts within a series of web pages. It gives you the ability to handle the page differences on a case-by-case basis. You can define error handling in two places in the Agent Builder: - The Action Properties panel (which can be done at any time). - The Error Handling panel when an error occurs. ### The Action Properties panel 1. Right-click an action you want to add error handling to, then select **Properties** > **ERROR HANDLING**. ![Perform a New Set of Actions When an Error Occurs_Image1](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/Perform%20a%20New%20Set%20of%20Actions%20When%20an%20Error%20Occurs_Image1.png) ![Perform a New Set of Actions When an Error Occurs_Image2](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/Perform%20a%20New%20Set%20of%20Actions%20When%20an%20Error%20Occurs_Image2.png) 1. Choose what to do if the agent encounters an error. ![Perform a New Set of Actions When an Error Occurs_Image3](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/Perform%20a%20New%20Set%20of%20Actions%20When%20an%20Error%20Occurs_Image3.png) 1. Select **SAVE**. ## The Error Handling panel 1. In the **Element Not Found** panel, select **This is the wrong page**. ![Perform a New Set of Actions When an Error Occurs_Image4](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/Perform%20a%20New%20Set%20of%20Actions%20When%20an%20Error%20Occurs_Image4.png) 1. In the left panel, select: - **Existing Page** if you have already created a page with the alternate actions you want to perform. - **New Page** if no alternate actions have been created for the current web page. ![Perform a New Set of Actions When an Error Occurs_Image5](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/Perform%20a%20New%20Set%20of%20Actions%20When%20an%20Error%20Occurs_Image5.png) ![Perform a New Set of Actions When an Error Occurs_Image6](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/Perform%20a%20New%20Set%20of%20Actions%20When%20an%20Error%20Occurs_Image6.png) 1. Select **SAVE**.