docs: document missing error types in Errors.md#5339
Open
cesarvspr wants to merge 1 commit into
Open
Conversation
b06ddff to
76c33c9
Compare
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. Signed-off-by: cesarvspr <vinicius_spr@hotmail.com>
76c33c9 to
5c3b2a1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5339 +/- ##
=======================================
Coverage 93.23% 93.23%
=======================================
Files 110 110
Lines 36668 36668
=======================================
Hits 34189 34189
Misses 2479 2479 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This relates to...
The
errorsdocumentation, 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.mddocuments the error objects exposed via theerrorskey, but several classes that are actually exported fromlib/core/errors.jswere absent from the table. Users hitting these errors (error.code === '...') had no reference for them. This adds the missing rows so the table matches whatundiciexports.Changes
Added the following rows to the errors table in
docs/docs/api/Errors.md, with codes and descriptions matching the definitions inlib/core/errors.js:AbortErrorUND_ERR_ABORTRequestRetryErrorUND_ERR_REQ_RETRYResponseErrorUND_ERR_RESPONSEMaxOriginsReachedErrorUND_ERR_MAX_ORIGINS_REACHEDBalancedPoolMissingUpstreamErrorUND_ERR_BPL_MISSING_UPSTREAMSocks5ProxyErrorUND_ERR_SOCKS5*HTTPParserErrorHPE_*Notes:
HTTPParserErrorextendsError(notUndiciError) and usesHPE_*codes; called out in its description so it doesn't contradict the existing "all errors below are extended fromUndiciError" note.Socks5ProxyErrorusesUND_ERR_SOCKS5*codes (e.g.UND_ERR_SOCKS5,UND_ERR_SOCKS5_AUTH_REJECTED).Features
N/A
Bug Fixes
N/A
Breaking Changes and Deprecations
N/A — documentation only, no API changes.
Status