Skip to content

errorToString

Converts an error to a string representation, including nested causes and the aggregated errors of an AggregateError, with indentation.

Import:

import { errorToString } from 'obsidian-dev-utils/error';

Signature:

function errorToString(error: unknown): string

Parameters:

ParameterTypeDescription
errorunknownThe error to convert to a string.

Returns: string — The string representation of the error.