Skip to content

Function: createMapstedError() ​

ts
function createMapstedError(
   code, 
   details?, 
   strict?): MapstedError;

Factory function for creating MapstedError instances.

Parameters ​

ParameterTypeDescription
codestringA valid MAPSTED-XXXX code from the error registry.
details?Record<string, unknown>Optional key/value context interpolated into the message.
strict?booleanControls redactInProduction behavior. When true, production-redacted params are shown in the message. Default false (redact in message, keep in details).

Returns ​

MapstedError