---
title: "Try / Catch"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/nodetool/control/trycatch
markdown: https://docs.nodetool.ai/nodes/nodetool/control/trycatch.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/nodetool/control/trycatch.md
---

# Try / Catch

**Type:** `nodetool.control.TryCatch`

**Namespace:** `nodetool.control`

## Description

Fallback wrapper: passes the value through when present, or emits the fallback with error info when the value is null/undefined (e.g. an upstream step produced nothing).
    control, error, fallback, default, null, missing, flow-control

    Use cases:
    - Provide fallback values when an upstream step produced no value
    - Detect missing values in workflows
    - Log error details for debugging

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| value | `any` | The value to pass through. When null/undefined, the fallback is used. | null |
| fallback | `any` | Value to return when the input value is null/undefined. | null |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `any` |  |
| error | `str` |  |
| has_error | `bool` |  |

## Related Nodes

Browse other nodes in the [nodetool.control](./) namespace.
