---
url: https://masyaka.github.io/injecute/errors/dispose-failed.md
description: Some services failed to dispose
---

# `INJECUTE_DISPOSE_FAILED`

**Some services failed to dispose.**

## How to fix it

Every other service was still disposed. The failures are in `cause` (an AggregateError).

## Handling it in code

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

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

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