---
outline: deep
---

# DF0024: Missing RPC Handler

## Message

> Either handler or setup function must be provided for RPC function "`{name}`"

## Cause

The RPC definition has neither a `handler` nor a `setup` returning `{ handler }`. devframe has nothing to invoke when the function is called.

## Fix

Add either `handler: ...` directly on the definition, or `setup: ctx => ({ handler: ... })` if the handler depends on context.

## Source

- [`packages/devframe/src/rpc/handler.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/rpc/handler.ts) — invocation throws `DF0024` when neither `handler` nor a `setup` returning `{ handler }` is provided.
- [`packages/devframe/src/rpc/dump/index.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/rpc/dump/index.ts) — dump generation also requires a handler and throws `DF0024` if the definition is incomplete.
