---
title: "Utilizing IgnoreErrors command"
slug: "utilizing-ignoreerrors-command-1"
updated: 2023-01-06T15:48:57Z
published: 2023-01-06T15:48:57Z
canonical: "docs.catchpoint.com/utilizing-ignoreerrors-command-1"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.catchpoint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Utilizing IgnoreErrors command

### **Syntax:**
`ignoreErrors(int)`

### **Purpose**
Prevents a Transaction test from failing due to an error.

### **Explanation**
This command lets you ignore errors (prevent test from ending). It takes one parameter which can be the integer 1 or 2. The parameter defines how it behaves when an error occurs:
- **1** - Ignore and do not record error
- **2** - Ignore and record error on the first failing verb of that step

###  **Supported Monitors:**
Emulated, Chrome, Mobile.

### **Examples**

#### Script expected to fail on type command - without ignoreErrors()
~~~
open("www.google.com")
waitForVisible("//input[@name='q']")  
type("//input[@name='qq']","Hello")
open("www.google.com")
~~~
#### Ignore and do not record error
~~~
open("www.google.com")
waitForVisible("//input[@name='q']")
ignoreErrors(1)
type("//input[@name='qq']","Hello")
type("//input[@name='qq']","Hello")
type("//input[@name='qqqwoeure']","Hello")
type("//input[@name='qqqifqeyrf']","Hello")
click("//input[@name='qqqifqeyrf']")
open("www.google.com")
~~~
#### Ignore and do record error on the first failing verb of that step
~~~
open("www.google.com")
waitForVisible("//input[@name='q']")
ignoreErrors(2)
type("//input[@name='qq']","Hello")
type("//input[@name='qq34']","Hello")
type("//input[@name='qq12']","Hello")
click("//input[@name='qqoijwecwe']")
open("www.google.com")
~~~
