Skip to content

formatError

formatError(error, options?): string

Defined in: packages/core/src/error/format-error.ts:107

Format errors and other values into a single string.

This function can handle nested causes and aggregated errors, formatting them recursively. It also allows customization of the output format through various options.

The default options can be overridden by setting the formatError.defaultOptions property.

unknown

The error or value to format

FormatErrorOptions

Options for formatting the error

string

The formatted error as a string