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

***

[Documentation](../../../README) / [@zerotal/tenancy](../README) / TenantStoragePathError

# Class: TenantStoragePathError

Defined in: [tenancy/src/errors.ts:77](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/tenancy/src/errors.ts#L77)

Raised when a caller-supplied storage key would escape the active tenant's directory.

`tenantDisk()` prefixes keys with `tenants/<slug>/`, but the underlying LocalDriver confines
paths to the *disk root*, not the tenant directory — so a key containing `..` resolved to a
sibling tenant's folder and passed the driver's own check. Traversal is rejected at the
prefixing layer instead.

## Extends

- [`ZerotalError`](../../core/index/classes/ZerotalError)

## Constructors

### Constructor

> **new TenantStoragePathError**(`path`, `slug`): `TenantStoragePathError`

Defined in: [tenancy/src/errors.ts:78](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/tenancy/src/errors.ts#L78)

#### Parameters

##### path

`string`

##### slug

`string`

#### Returns

`TenantStoragePathError`

#### Overrides

[`ZerotalError`](../../core/index/classes/ZerotalError).[`constructor`](../../core/index/classes/ZerotalError#constructor)

## Properties

### code

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

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

#### Inherited from

[`ZerotalError`](../../core/index/classes/ZerotalError).[`code`](../../core/index/classes/ZerotalError#code)

***

### status

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

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

#### Inherited from

[`ZerotalError`](../../core/index/classes/ZerotalError).[`status`](../../core/index/classes/ZerotalError#status)

***

### context?

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

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

#### Inherited from

[`ZerotalError`](../../core/index/classes/ZerotalError).[`context`](../../core/index/classes/ZerotalError#context)
