---
url: https://masyaka.github.io/injecute/errors/read-only.md
description: The object is read-only
---

# `INJECUTE_READ_ONLY`

**The object is read-only.**

## How to fix it

Proxy accessors only read services. Register or replace services on the container.

## Handling it in code

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

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

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