docs: document missing error types in Errors.md by cesarvspr · Pull Request #5339 · nodejs/undici (original) (raw)

This relates to...

The errors documentation, which was missing several exported error classes. Closely related to the documentation gap noted in #1865 (timeout/error code explanations).

Rationale

docs/docs/api/Errors.md documents the error objects exposed via the errors key, but several classes that are actually exported from lib/core/errors.js were absent from the table. Users hitting these errors (error.code === '...') had no reference for them. This adds the missing rows so the table matches what undici exports.

Changes

Added the following rows to the errors table in docs/docs/api/Errors.md, with codes and descriptions matching the definitions in lib/core/errors.js:

Error Code
AbortError UND_ERR_ABORT
RequestRetryError UND_ERR_REQ_RETRY
ResponseError UND_ERR_RESPONSE
MaxOriginsReachedError UND_ERR_MAX_ORIGINS_REACHED
BalancedPoolMissingUpstreamError UND_ERR_BPL_MISSING_UPSTREAM
Socks5ProxyError UND_ERR_SOCKS5*
HTTPParserError HPE_*

Notes:

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A — documentation only, no API changes.

Status