feedstock

Error Messages

AI-friendly error conversion for actionable diagnostics.

Feedstock automatically converts cryptic browser and network errors into clear, actionable messages.

Automatic Conversion

When a crawl fails, the error message is automatically converted:

const result = await crawler.crawl("https://nonexistent.example.com");
console.log(result.errorMessage);
// "DNS resolution failed. The domain does not exist or DNS is unreachable."
// Instead of: "net::ERR_NAME_NOT_RESOLVED at navigating to..."

Error Patterns

Raw ErrorFriendly Message
net::ERR_NAME_NOT_RESOLVEDDNS resolution failed. The domain does not exist or DNS is unreachable.
net::ERR_CONNECTION_REFUSEDConnection refused. The server is not running or is blocking connections.
Timeout 30000ms exceededConnection timed out. Try increasing pageTimeout.
net::ERR_SSL_PROTOCOL_ERRORSSL/TLS error. Try setting ignoreHttpsErrors: true.
net::ERR_TOO_MANY_REDIRECTSToo many redirects. The page is stuck in a redirect loop.
element is not visibleElement exists but is not visible.
element click interceptedAnother element is covering the target (modal/popup).
waiting for selectorTimed out waiting for element. Wrong selector or page not loaded.
browser has been closedBrowser closed unexpectedly. Process may have crashed.
ECONNREFUSEDConnection refused. No server listening.
ENOTFOUNDDomain not found. Check URL for typos.

Direct Usage

import { toFriendlyError, withFriendlyErrors } from "feedstock";

// Convert an error
const message = toFriendlyError(new Error("net::ERR_CONNECTION_REFUSED"));

// Wrap a function
const result = await withFriendlyErrors(() => riskyOperation());

Unknown errors are passed through with common noise stripped (stack traces, "Error:" prefix).

On this page