Skip to content
RelKit
Esc
↑↓navigate↵open⌘Jpreview
On this page

RELKIT_FUNCTION_ERROR_UNUSED

Function declares an error it never raises.

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.