Appearance
Class: MapstedError
Extends
Error
Constructors
Constructor
ts
new MapstedError(
code,
details?,
strict?): MapstedError;Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
code | string | undefined | A valid MAPSTED-XXXX string from the error registry. |
details? | Record<string, unknown> | undefined | Optional key/value context. Template params are interpolated into the human-readable message. |
strict? | boolean | false | Controls redactInProduction behavior. When false (default), params listed under redactInProduction are replaced with [REDACTED] in the message (but retained in details). |
Returns
MapstedError
Overrides
ts
Error.constructorProperties
Methods
toJSON()
ts
toJSON(): {
code: string;
details: Record<string, unknown> | undefined;
message: string;
recoverable: boolean;
};JSON-serialisable representation of the error.
Returns
ts
{
code: string;
details: Record<string, unknown> | undefined;
message: string;
recoverable: boolean;
}| Name | Type |
|---|---|
code | string |
details | Record<string, unknown> | undefined |
message | string |
recoverable | boolean |