---
title: IF_ERROR
url: https://www.tines.com/docs/formulas/functions/if-error/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/docs/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# IF_ERROR

*[View on tines.com](https://www.tines.com/docs/formulas/functions/if-error/)*

If `expression` produces an error, the result of `fallback_expression` is returned. If there is no error, the result of `expression` is returned.

**Categories:** Logic

## Syntax

```
IF_ERROR(expression, fallback_expression)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "value": 5
  }
}
```

Formula:

```
IF_ERROR(my_action.value, "error!")
```

Output:

```json
5
```

### Example 2

Input:

```json
{
  "my_action": {
    "value": 5
  }
}
```

Formula:

```
IF_ERROR(my_action.value / 0, "error!")
```

Output:

```json
"error!"
```
