Skip to main content

redactError()

function redactError(error: Error): {
  message: string;
  name: string;
  stack?: string;
};

Defined in: src/lib/logging/redaction.ts:974

Creates a safe copy of an error for logging. Redacts any PII that might be in the error message.

Parameters

ParameterTypeDescription
errorErrorThe error to make safe.

Returns

{
  message: string;
  name: string;
  stack?: string;
}

A safe error object for logging.

NameTypeDefined in
messagestringsrc/lib/logging/redaction.ts:974
namestringsrc/lib/logging/redaction.ts:974
stack?stringsrc/lib/logging/redaction.ts:974