> ## Documentation Index
> Fetch the complete documentation index at: https://e2b.manicule.dev/sdk-javascript-v2.10.2/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://e2b.manicule.dev/sdk-javascript-v2.10.2/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://e2b.manicule.dev/api/mcp.
> Every agent surface: https://e2b.manicule.dev/.well-known/llms-manifest.json

# Errors (/sdk-javascript-v2.10.2/errors)

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

### AuthenticationError

Thrown when authentication fails.

#### Constructors

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

###### Parameters

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

###### Returns

`AuthenticationError`

***

### BuildError

Thrown when the build fails.

#### Extended by

* `FileUploadError`

#### Constructors

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

###### Parameters

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

###### Returns

`BuildError`

***

### FileUploadError

Thrown when the file upload fails.

#### Constructors

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

###### Parameters

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

###### Returns

`FileUploadError`

***

### InvalidArgumentError

Thrown when an invalid argument is provided.

#### Constructors

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

###### Parameters

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

###### Returns

`InvalidArgumentError`

***

### NotEnoughSpaceError

Thrown when there is not enough disk space.

#### Constructors

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

###### Parameters

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

###### Returns

`NotEnoughSpaceError`

***

### NotFoundError

Thrown when a resource is not found.

#### Constructors

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

###### Parameters

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

###### Returns

`NotFoundError`

***

### RateLimitError

Thrown when the API rate limit is exceeded.

#### Constructors

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

###### Parameters

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

###### Returns

`RateLimitError`

***

### SandboxError

Base class for all sandbox errors.

Thrown when general sandbox errors occur.

#### Extended by

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

#### Constructors

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

###### Parameters

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

###### Returns

`SandboxError`

***

### TemplateError

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

#### Constructors

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

###### Parameters

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

###### Returns

`TemplateError`

***

### 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

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

###### Parameters

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

###### Returns

`TimeoutError`

## Functions

### formatSandboxTimeoutError()

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

#### Parameters

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

#### Returns

`TimeoutError`
