---
title: "Throw error"
description: "Raise a catchable error with a message and optional code."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/error/throw"
---
# Throw error

> Raise a catchable error with a message and optional code.

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



</block-meta>

**Throw error** stops the current path with a **catchable** error. It never continues on a success outlet. Catch it with a block **Error** outlet, [Try](https://docs.vettero.com/build/workflows/blocks/error/try) **On error**, or let the run fail.

It does not raise a fatal error. Fatal stops are reserved for platform limits, internal failures, and unexpected thrown `Error` values.

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Message
      </strong>
    </td>
    
    <td>
      Text (or a variable) for callers and logs
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Code
      </strong>
    </td>
    
    <td>
      Optional stable code for <a href="https://docs.vettero.com/build/workflows/blocks/error/branch">
        Branch errors
      </a>
      
      . Default <code>
        THROWN
      </code>
    </td>
  </tr>
</tbody>
</table>

## Handles

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

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
</tbody>
</table>

There is no Out handle.

## Use case

- After a [Condition](https://docs.vettero.com/build/workflows/blocks/condition/condition) false branch, fail with `INVALID_STATUS` so Branch errors can route it.
- Inside Try Do, abort that body and jump to On error.

<block-page-nav>



</block-page-nav>


## Sitemap

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