# Errors (/v2.29.1/errors)

<!-- agent-signals: reading_time_min: 4 · est_tokens: 1774 · updated: 2026-07-30 -->
Related: [Sandbox](/v2.29.1/sandbox.md), [Sandbox Commands](/v2.29.1/sandbox-commands.md), [Sandbox Filesystem](/v2.29.1/sandbox-filesystem.md), [Template](/v2.29.1/template.md), [Template Logger](/v2.29.1/template-logger.md), [Template Readycmd](/v2.29.1/template-readycmd.md)

### AuthenticationError [#authenticationerror]

Thrown when authentication fails.

#### Extended by [#extended-by]

* `GitAuthError`

#### Constructors [#constructors]

```ts
new AuthenticationError(message: string): AuthenticationError
```

###### Parameters [#parameters]

| Parameter | Type     |
| --------- | -------- |
| `message` | `string` |

###### Returns [#returns]

`AuthenticationError`

````

***

### BuildError

Thrown when the build fails.

#### Extended by

- `FileUploadError`

#### Constructors

```ts
new BuildError(message: string, stackTrace?: string): BuildError
````

###### Parameters [#parameters-1]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-1]

`BuildError`

````

***

### FileNotFoundError

Thrown when a file or directory is not found inside a sandbox.

#### Constructors

```ts
new FileNotFoundError(message: string, stackTrace?: string): FileNotFoundError
````

###### Parameters [#parameters-2]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-2]

`FileNotFoundError`

***

### FileUploadError [#fileuploaderror]

Thrown when the file upload fails.

#### Constructors [#constructors-1]

```ts
new FileUploadError(message: string, stackTrace?: string): FileUploadError
```

###### Parameters [#parameters-3]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-3]

`FileUploadError`

***

### GitAuthError [#gitautherror]

Thrown when git authentication fails.

#### Constructors [#constructors-2]

```ts
new GitAuthError(message: string): GitAuthError
```

###### Parameters [#parameters-4]

| Parameter | Type     |
| --------- | -------- |
| `message` | `string` |

###### Returns [#returns-4]

`GitAuthError`

***

### GitUpstreamError [#gitupstreamerror]

Thrown when git upstream tracking is missing.

#### Constructors [#constructors-3]

```ts
new GitUpstreamError(message: string, stackTrace?: string): GitUpstreamError
```

###### Parameters [#parameters-5]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-5]

`GitUpstreamError`

***

### InvalidArgumentError [#invalidargumenterror]

Thrown when an invalid argument is provided.

#### Constructors [#constructors-4]

```ts
new InvalidArgumentError(message: string, stackTrace?: string): InvalidArgumentError
```

###### Parameters [#parameters-6]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-6]

`InvalidArgumentError`

***

### NotEnoughSpaceError [#notenoughspaceerror]

Thrown when there is not enough disk space.

#### Constructors [#constructors-5]

```ts
new NotEnoughSpaceError(message: string, stackTrace?: string): NotEnoughSpaceError
```

###### Parameters [#parameters-7]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-7]

`NotEnoughSpaceError`

***

### ~~NotFoundError~~ [#notfounderror]

Thrown when a resource is not found.

#### Deprecated [#deprecated]

Use FileNotFoundError or SandboxNotFoundError instead. This class will be removed in the next major version.

#### Extended by [#extended-by-1]

* `FileNotFoundError`
* `SandboxNotFoundError`

#### Constructors [#constructors-6]

```ts
new NotFoundError(message: string, stackTrace?: string): NotFoundError
```

###### Parameters [#parameters-8]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-8]

`NotFoundError`

***

### RateLimitError [#ratelimiterror]

Thrown when the API rate limit is exceeded.

#### Constructors [#constructors-7]

```ts
new RateLimitError(message: string): RateLimitError
```

###### Parameters [#parameters-9]

| Parameter | Type     |
| --------- | -------- |
| `message` | `string` |

###### Returns [#returns-9]

`RateLimitError`

***

### SandboxError [#sandboxerror]

Base class for all sandbox errors.

Thrown when general sandbox errors occur.

#### Extended by [#extended-by-2]

* `TimeoutError`
* `InvalidArgumentError`
* `NotEnoughSpaceError`
* `NotFoundError`
* `GitUpstreamError`
* `TemplateError`
* `RateLimitError`

#### Constructors [#constructors-8]

```ts
new SandboxError(message?: string, stackTrace?: string): SandboxError
```

###### Parameters [#parameters-10]

| Parameter     | Type     |
| ------------- | -------- |
| `message`?    | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-10]

`SandboxError`

````

***

### SandboxNotFoundError

Thrown when a sandbox is not found (e.g. it doesn't exist or is no longer running).

#### Constructors

```ts
new SandboxNotFoundError(message: string, stackTrace?: string): SandboxNotFoundError
````

###### Parameters [#parameters-11]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-11]

`SandboxNotFoundError`

***

### TemplateError [#templateerror]

Thrown when the template uses old envd version. It isn't compatible with the new SDK.

#### Constructors [#constructors-9]

```ts
new TemplateError(message: string, stackTrace?: string): TemplateError
```

###### Parameters [#parameters-12]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-12]

`TemplateError`

***

### TimeoutError [#timeouterror]

Thrown when a timeout error occurs.

The \[unavailable] error type is caused by sandbox timeout.

The \[canceled] error type is caused by exceeding request timeout.

The \[deadline\_exceeded] error type is caused by exceeding the timeout for command execution, watch, etc.

The \[unknown] error type is sometimes caused by the sandbox timeout when the request is not processed correctly.

#### Constructors [#constructors-10]

```ts
new TimeoutError(message: string, stackTrace?: string): TimeoutError
```

###### Parameters [#parameters-13]

| Parameter     | Type     |
| ------------- | -------- |
| `message`     | `string` |
| `stackTrace`? | `string` |

###### Returns [#returns-13]

`TimeoutError`

***

### VolumeError [#volumeerror]

Base class for all volume errors.

Thrown when general volume errors occur.

#### Constructors [#constructors-11]

```ts
new VolumeError(message: string): VolumeError
```

###### Parameters [#parameters-14]

| Parameter | Type     |
| --------- | -------- |
| `message` | `string` |

###### Returns [#returns-14]

`VolumeError`

````

## Functions

### formatSandboxTimeoutError()

```ts
function formatSandboxTimeoutError(message: string): TimeoutError
````

#### Parameters [#parameters-15]

| Parameter | Type     |
| --------- | -------- |
| `message` | `string` |

#### Returns [#returns-15]

`TimeoutError`
