---
title: RELKIT_FUNCTION_ERROR_UNUSED
description: "Function declares an error it never raises."
pagination: false
search:
  keywords: [RELKIT_FUNCTION_ERROR_UNUSED]
sidebar:
  icon: triangle-alert
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

**Function declares an error it never raises.**

## What happened

The opt-in `check.unusedErrors` rule is on, and a function lists an error in `errors` that its handler never throws or returns. The rule only looks inside the handler, so an error raised from a helper function also counts as unused.

## What to do

Throw or return the error from the handler, or remove it from the function's `errors`.

Reported by `@relkit/cli`, `relkit/diagnostics`.

See [all error codes](/docs/errors).
