• Sends an error to Bugsnag. This is configured automatically for uncaught errors from CLI commands, but can also be used to manually record an error.

    Parameters

    Returns Promise<
        | { error: unknown; reported: false; unhandled: unknown }
        | { error: Error; reported: true; unhandled: boolean },
    >

    the reported error (this may have been tweaked for better reporting), and a bool to indicate if the error was actually submitted or not