---
url: https://masyaka.github.io/injecute/errors/namespace-conflict.md
description: The namespace name is already used by a service
---

# `INJECUTE_NAMESPACE_CONFLICT`

**The namespace name is already used by a service.**

## How to fix it

Choose another namespace name, or remove the service with that key.

## Handling it in code

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

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

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