Skip to content

basalt / tenancy/src / TenantRequiredError

Class: TenantRequiredError ​

Defined in: tenancy/src/scoped.ts:10

A tenant-owned operation ran without a tenant in context (and without an explicit fallback). Fails closed: better a 400 than silently querying UNSCOPED — with Prisma, where: { tenantId: undefined } drops the filter and returns every tenant's rows. Maps to HTTP 400 in every adapter.

Extends ​

Constructors ​

Constructor ​

> new TenantRequiredError(): TenantRequiredError

Defined in: tenancy/src/scoped.ts:12

Returns ​

TenantRequiredError

Overrides ​

BasaltError.constructor

Properties ​

code ​

> readonly code: string

Defined in: core/src/errors.ts:25

Inherited from ​

BasaltError.code


details? ​

> readonly optional details?: Record<string, unknown>

Defined in: core/src/errors.ts:28

Structured payload passed to the constructor, exactly as given (never sanitised here).

Inherited from ​

BasaltError.details


status ​

> readonly status: 400 = 400

Defined in: tenancy/src/scoped.ts:11

Released under the MIT License.