---
outline: deep
---

# DF0034: Already-Namespaced Scoped Registration

## Message

> Scoped RPC registration for namespace "`{namespace}`" received an already-namespaced function name "`{name}`".

## Cause

A [scoped context](../guide/scoped-context) auto-namespaces the ids you pass it. `ctx.scope('my-plugin').rpc.register(...)` therefore expects a **bare** function name and stores it as `my-plugin:<name>`. Passing a name that already contains a `:` separator would produce a double-prefixed id, so registration throws instead.

## Example

```ts
const my = ctx.scope('my-plugin')

// ✗ Bad — already namespaced
my.rpc.register(defineRpcFunction({ name: 'my-plugin:get-cwd', type: 'query', handler }))

// ✓ Good — bare name, stored as `my-plugin:get-cwd`
my.rpc.register(defineRpcFunction({ name: 'get-cwd', type: 'query', handler }))
```

## Fix

- Pass a bare name (no `:` separator) to the scoped `register`.
- To register a fully-qualified name on purpose, use the unscoped host: `ctx.base.rpc.register(...)` (server) or `client.scope(...).base.client.register(...)` (browser).

## Source

- [`packages/devframe/src/node/scope.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/node/scope.ts) — `register()` / `update()` throw this when the supplied definition name is already namespaced.
