---
title: "DF0024: Missing RPC Handler"
description: "Either handler or setup function must be provided for RPC function \"{name}\""
canonical_url: "https://devfra.me/errors/df0024"
---
# DF0024: Missing RPC Handler

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

## 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.


## Sitemap

See the full [sitemap](https://devfra.me/sitemap.md) for all pages.
