---
title: "Branch errors"
description: "Split an error path by declared error codes, with Other as the fallback."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/error/branch"
---
# Branch errors

> Split an error path by declared error codes, with Other as the fallback.

<block-meta block="Yes" channels="Any" folder="basic/error" group="Error" groupTo="/build/workflows/blocks/error" icon="i-lucide-git-fork" pipe="Input" scope="Any" tool="No" type="err.branch">



</block-meta>

**Branch errors** sits on an error path. Connect its **In** from a block **Error** outlet or from [Try](https://docs.vettero.com/build/workflows/blocks/error/try) **On error**. The canvas lists every **error code** declared on that upstream block (for Try On error, codes from the Do subgraph, including [Throw error](https://docs.vettero.com/build/workflows/blocks/error/throw)).

Each listed code has its own outlet. **Other** (bottom) receives:

- Listed codes you did **not** connect
- Codes the schema does not list
- Errors with no code

If **Other** is not connected, the error throws (same as an unused Error outlet).

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming error path
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Per code
      </strong>
      
       (<code>
        err.branch.code.<CODE>
      </code>
      
      )
    </td>
    
    <td>
      That declared code, when the outlet is connected
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Other
      </strong>
      
       (<code>
        err.branch.other
      </code>
      
      )
    </td>
    
    <td>
      Everything else, including unwired listed codes
    </td>
  </tr>
</tbody>
</table>

The next block still sees the error as `pipe.error` / context `error` (`message`, `code`, `data`, `blockId`, `blockType`).

## Use case

- After an [API](https://docs.vettero.com/build/workflows/blocks/utility/api) Error outlet: `LOOPBACK_URL_BLOCKED` vs `INVALID_SERVER_URL` vs Other.
- After Try On error: `THROWN` vs Other.

<block-page-nav>



</block-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
