ReaderError class and carry a typed code, a retryable flag, and a toJSON() method for structured logging.
Base class
ReaderError.
Error reference
| Error class | Code | Retryable | When it’s thrown |
|---|---|---|---|
NetworkError | NETWORK_ERROR | ✅ | Connection reset, socket error, network unreachable |
TimeoutError | TIMEOUT | ✅ | Request or page load exceeded timeoutMs |
DNSError | DNS_ERROR | ❌ | Cannot resolve hostname |
TLSError | TLS_ERROR | ✅ | SSL/certificate handshake failed |
CloudflareError | CLOUDFLARE_CHALLENGE | ✅ | Cloudflare challenge didn’t resolve in time |
BotDetectedError | BOT_DETECTED | ✅ | Bot detection page detected in response |
AccessDeniedError | ACCESS_DENIED | ❌ | 401/403 returned by the origin |
ProxyConnectionError | PROXY_CONNECTION_ERROR | ✅ | Proxy unreachable or auth failed |
ProxyExhaustedError | PROXY_EXHAUSTED | ❌ | All proxy tiers tried and failed |
ContentExtractionError | CONTENT_EXTRACTION_FAILED | ❌ | HTML parsing failed - likely corrupt response |
EmptyContentError | EMPTY_CONTENT | ✅ | Content below minimum length (50 chars) - could be rate limit |
ContentTooLargeError | CONTENT_TOO_LARGE | ❌ | HTML exceeds maximum size limit |
MarkdownConversionError | MARKDOWN_CONVERSION_FAILED | ❌ | supermarkdown couldn’t convert the HTML |
InvalidUrlError | INVALID_URL | ❌ | URL parsing failed |
ValidationError | INVALID_OPTIONS | ❌ | Invalid options passed to scrape/crawl |
RobotsBlockedError | ROBOTS_BLOCKED | ❌ | URL blocked by robots.txt |
BrowserPoolError | BROWSER_ERROR | ✅ | Pool initialization or instance failure |
ClientClosedError | CLIENT_CLOSED | ❌ | Client has already been closed |
NotInitializedError | NOT_INITIALIZED | ❌ | Internal - component not initialized (bug report this) |
RetryBudgetExhaustedError | RETRY_BUDGET_EXHAUSTED | ❌ | All retries (engine switch, proxy escalation, general) exhausted |
Importing specific error classes
Serialized error format
EveryReaderError instance has a toJSON() method for structured logging:
Retry pattern using the flag
Where to go next
Error Handling concept
Retry budgets and how errors propagate through the pipeline.

