• Converts an error-like value to an Error instance. If the input is already an Error, returns it directly. Otherwise, creates a new Error with an appropriate string representation of the input.

    Parameters

    • value: unknown

      The value to convert.

    Returns Error

    An Error instance containing a string representation of the input