---
url: https://masyaka.github.io/injecute/errors/namespace-result.md
description: A namespace callback returned something other than a new container
---

# `INJECUTE_NAMESPACE_RESULT`

**A namespace callback returned something other than a new container.**

## How to fix it

Return the registry the callback received (after adding services), a fork of it, or a new DIContainer.

## Handling it in code

```ts
import { InjecuteError } from 'injecute';

try {
  // ...
} catch (error) {
  if (error instanceof InjecuteError && error.code === 'INJECUTE_NAMESPACE_RESULT') {
    // error.message explains what happened; error.path is the resolution chain
  }
}
```

[All error codes](./index.md)
