Skip to content

basalt / subscriptions/src / CouponInvalidError

Class: CouponInvalidError ​

Defined in: subscriptions/src/coupon.ts:33

Base error for the whole ecosystem. The code is stable and part of the semver contract — apps can safely branch on codes.

Extends ​

Constructors ​

Constructor ​

> new CouponInvalidError(code, reason): CouponInvalidError

Defined in: subscriptions/src/coupon.ts:35

Parameters ​

code ​

string

reason ​

string

Returns ​

CouponInvalidError

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: 422 = 422

Defined in: subscriptions/src/coupon.ts:34

Released under the MIT License.