@ac-essentials/misc-util
    Preparing search index...

    Function formatError

    • 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.

      Parameters

      • error: unknown

        The error or value to format

      • Optionaloptions: FormatErrorOptions

        Options for formatting the error

      Returns string

      The formatted error as a string