@karmaniverous/jeeves
    Preparing search index...

    Function connectionFail

    • Format a connection error with actionable guidance.

      Parameters

      • error: unknown

        Error instance (typically from fetch).

      • baseUrl: string

        The URL that was being contacted.

      • pluginId: string

        The plugin identifier for config guidance.

      Returns ToolResult

      A ToolResult with isError: true.

      Detects ECONNREFUSED, ENOTFOUND, and ETIMEDOUT from error.cause.code and returns a user-friendly message referencing the plugin's config.apiUrl setting. Falls back to fail() for non-connection errors.