method ErrorUtils.format
ErrorUtils.format(error: unknown): string

Creates a formatted error stack for logging. Includes cause chain if available.

Parameters

error: unknown
  • Error to format

Return Type

string

Formatted error string

Usage

import { ErrorUtils } from ".";