Skip to content

basalt / subscriptions/src / UnknownPlanMetaError

Class: UnknownPlanMetaError ​

Defined in: subscriptions/src/plugin.ts:56

A route is gated on a plan the catalogue does not contain.

Subscriptions.subscribed() compares strings; a name that matches nothing simply returns false, and the guard turns that into a 402. So a typo — or a plan renamed in the catalogue and not in the route — produces a paid feature that answers 402 to every paying customer, forever, with nothing in the logs to say why.

The toolkit already refuses to boot a route declaring meta.subscribed without this plugin. This is the same check one level down: the plugin is there, but the value means nothing.

Extends ​

Constructors ​

Constructor ​

> new UnknownPlanMetaError(offenders, known): UnknownPlanMetaError

Defined in: subscriptions/src/plugin.ts:57

Parameters ​

offenders ​

object[]

known ​

string[]

Returns ​

UnknownPlanMetaError

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

Released under the MIT License.