---
title: errors
---

## Classes

### DirtyTree

An operation that requires a clean tree found uncommitted changes.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new DirtyTree(...args): DirtyTree;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`DirtyTree`](/api/contracts/errors/#dirtytree)

###### Inherited from

```ts
Schema.TaggedError<DirtyTree>()("DirtyTree", {
  paths: Schema.Array(Schema.String)
}).constructor
```

#### Properties

##### paths

```ts
readonly paths: readonly string[];
```

###### Inherited from

```ts
Schema.TaggedError<DirtyTree>()("DirtyTree", {
  paths: Schema.Array(Schema.String)
}).paths
```

***

### DuplicateContent

The content hash already belongs to an active file. `existingPath` is what the
caller wanted to create, so a deduped write is answerable without a second query.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new DuplicateContent(...args): DuplicateContent;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`DuplicateContent`](/api/contracts/errors/#duplicatecontent)

###### Inherited from

```ts
Schema.TaggedError<DuplicateContent>()("DuplicateContent", {
  contentHash: Schema.String,
  existingPath: Schema.String
}).constructor
```

#### Properties

##### contentHash

```ts
readonly contentHash: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<DuplicateContent>()("DuplicateContent", {
  contentHash: Schema.String,
  existingPath: Schema.String
}).contentHash
```

##### existingPath

```ts
readonly existingPath: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<DuplicateContent>()("DuplicateContent", {
  contentHash: Schema.String,
  existingPath: Schema.String
}).existingPath
```

***

### InvalidMemory

A memory that violates the file format or the type/placement vocabulary.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new InvalidMemory(...args): InvalidMemory;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`InvalidMemory`](/api/contracts/errors/#invalidmemory)

###### Inherited from

```ts
Schema.TaggedError<InvalidMemory>()("InvalidMemory", {
  reason: Schema.String
}).constructor
```

#### Properties

##### reason

```ts
readonly reason: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<InvalidMemory>()("InvalidMemory", {
  reason: Schema.String
}).reason
```

***

### LlmContractViolation

The model broke its structured-output contract: an undecodable tool payload, a
`max_tokens` stop, or a refusal. The item is reported with no result, and a
violation does not become a value.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new LlmContractViolation(...args): LlmContractViolation;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`LlmContractViolation`](/api/contracts/errors/#llmcontractviolation)

###### Inherited from

```ts
Schema.TaggedError<LlmContractViolation>()(
  "LlmContractViolation",
  {
    reason: Schema.String
  }
).constructor
```

#### Properties

##### reason

```ts
readonly reason: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<LlmContractViolation>()(
  "LlmContractViolation",
  {
    reason: Schema.String
  }
).reason
```

***

### ModelUnavailable

Bedrock refused the call: throttling, an unavailable model, or a denied region.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new ModelUnavailable(...args): ModelUnavailable;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`ModelUnavailable`](/api/contracts/errors/#modelunavailable)

###### Inherited from

```ts
Schema.TaggedError<ModelUnavailable>()("ModelUnavailable", {
  modelId: Schema.String,
  reason: Schema.String
}).constructor
```

#### Properties

##### modelId

```ts
readonly modelId: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<ModelUnavailable>()("ModelUnavailable", {
  modelId: Schema.String,
  reason: Schema.String
}).modelId
```

##### reason

```ts
readonly reason: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<ModelUnavailable>()("ModelUnavailable", {
  modelId: Schema.String,
  reason: Schema.String
}).reason
```

***

### PathNotFound

A repo-root-relative path with no file behind it.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new PathNotFound(...args): PathNotFound;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`PathNotFound`](/api/contracts/errors/#pathnotfound)

###### Inherited from

```ts
Schema.TaggedError<PathNotFound>()("PathNotFound", {
  path: Schema.String
}).constructor
```

#### Properties

##### path

```ts
readonly path: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<PathNotFound>()("PathNotFound", {
  path: Schema.String
}).path
```

***

### StorageFailure

A driver or filesystem rejection, reduced to the operation that failed.
The payload deliberately excludes SQL text, parameters, and row contents so a
storage error can be returned to an agent without leaking corpus content; the
driver's own message goes to `Effect.logError` at the adapter edge instead.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new StorageFailure(...args): StorageFailure;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`StorageFailure`](/api/contracts/errors/#storagefailure)

###### Inherited from

```ts
Schema.TaggedError<StorageFailure>()("StorageFailure", {
  operation: Schema.String
}).constructor
```

#### Properties

##### operation

```ts
readonly operation: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<StorageFailure>()("StorageFailure", {
  operation: Schema.String
}).operation
```

***

### WriteConflict

Two writers touched the same file. `ourSha` is the blob sha this process wrote
from, `theirSha` the blob sha now in the tree. Recovery belongs to the caller:
re-read the current content and reapply.

#### Extends

* `object` & `YieldableError`\<`this`>

#### Constructors

##### Constructor

```ts
new WriteConflict(...args): WriteConflict;
```

###### Parameters

###### args

...\[`object`, `MakeOptions`]

###### Returns

[`WriteConflict`](/api/contracts/errors/#writeconflict)

###### Inherited from

```ts
Schema.TaggedError<WriteConflict>()("WriteConflict", {
  path: Schema.String,
  ourSha: Schema.String,
  theirSha: Schema.String
}).constructor
```

#### Properties

##### ourSha

```ts
readonly ourSha: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<WriteConflict>()("WriteConflict", {
  path: Schema.String,
  ourSha: Schema.String,
  theirSha: Schema.String
}).ourSha
```

##### path

```ts
readonly path: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<WriteConflict>()("WriteConflict", {
  path: Schema.String,
  ourSha: Schema.String,
  theirSha: Schema.String
}).path
```

##### theirSha

```ts
readonly theirSha: string = Schema.String;
```

###### Inherited from

```ts
Schema.TaggedError<WriteConflict>()("WriteConflict", {
  path: Schema.String,
  ourSha: Schema.String,
  theirSha: Schema.String
}).theirSha
```