[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/core](../../README) / [storage](../README) / UnsafePublicMountError

# Class: UnsafePublicMountError

Defined in: [storage/errors.ts:122](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/storage/errors.ts#L122)

Thrown when a disk outside the public directory is served without signing.

Everything under the storage root is private except `storage/public`. A disk
rooted elsewhere can still be exposed — but only behind `signed: true`, where
each request carries a signature you issued. Serving it openly would make
private files world-readable through a URL prefix, which is the mistake this
refuses to let a config express.

## Extends

- [`StorageError`](StorageError)

## Constructors

### Constructor

> **new UnsafePublicMountError**(`disk`, `root`, `publicRoot`): `UnsafePublicMountError`

Defined in: [storage/errors.ts:123](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/storage/errors.ts#L123)

#### Parameters

##### disk

`string`

##### root

`string`

##### publicRoot

`string`

#### Returns

`UnsafePublicMountError`

#### Overrides

[`StorageError`](StorageError).[`constructor`](StorageError#constructor)

## Properties

### code

> `readonly` **code**: `string`

Defined in: [errors/ZerotalError.ts:18](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/errors/ZerotalError.ts#L18)

#### Inherited from

[`StorageError`](StorageError).[`code`](StorageError#code)

***

### status

> `readonly` **status**: `number` = `500`

Defined in: [errors/ZerotalError.ts:19](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/errors/ZerotalError.ts#L19)

#### Inherited from

[`StorageError`](StorageError).[`status`](StorageError#status)

***

### context?

> `readonly` `optional` **context?**: `Record`\<`string`, `unknown`\>

Defined in: [errors/ZerotalError.ts:20](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/errors/ZerotalError.ts#L20)

#### Inherited from

[`StorageError`](StorageError).[`context`](StorageError#context)
