Skip to content

docs: document missing error types in Errors.md#5339

Open
cesarvspr wants to merge 1 commit into
nodejs:mainfrom
cesarvspr:docs/document-missing-error-types
Open

docs: document missing error types in Errors.md#5339
cesarvspr wants to merge 1 commit into
nodejs:mainfrom
cesarvspr:docs/document-missing-error-types

Conversation

@cesarvspr
Copy link
Copy Markdown

Summary

docs/docs/api/Errors.md lists the error objects exposed via the errors key, but several exported error classes were missing from the table. This PR adds them, with codes and descriptions matching their definitions in lib/core/errors.js.

Added entries:

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:

  • HTTPParserError extends Error (not UndiciError) and uses HPE_* codes; this is called out in the description so it doesn't contradict the "all errors below are extended from UndiciError" note.
  • Socks5ProxyError uses UND_ERR_SOCKS5* codes (e.g. UND_ERR_SOCKS5, UND_ERR_SOCKS5_AUTH_REJECTED).

Docs-only change; no code affected.

The errors table was missing several error classes that are exported
from `undici`'s `errors` key: AbortError, RequestRetryError,
ResponseError, MaxOriginsReachedError, BalancedPoolMissingUpstreamError,
Socks5ProxyError and HTTPParserError. Add them with their codes and
descriptions, matching the definitions in lib/core/errors.js.
@cesarvspr cesarvspr force-pushed the docs/document-missing-error-types branch from b06ddff to 76c33c9 Compare May 31, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant