Format a connection error with actionable guidance.
Error instance (typically from fetch).
fetch
The URL that was being contacted.
The plugin identifier for config guidance.
A ToolResult with isError: true.
ToolResult
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.
ECONNREFUSED
ENOTFOUND
ETIMEDOUT
error.cause.code
config.apiUrl
fail()
Format a connection error with actionable guidance.