Repository navigation
docs(errors): clarify timeout error codes and related options - #4856
Conversation
| | `UND_ERR_BODY_TIMEOUT` | While reading the response body, no new data arrived before the body timeout elapsed. | [`bodyTimeout`](/docs/docs/api/Client.md#parameter-clientoptions) | | ||
| | `UND_ERR_SOCKET` | A generic socket-level failure happened (including some timeout-related socket errors). | Inspect `error.socket` and adjust your dispatcher/client socket settings. | | ||
|
|
||
| > **Note**: `UND_ERR_SOCKET_TIMEOUT` is not an Undici error code. |
There was a problem hiding this comment.
I'd suggest to remove this, as it can lead to ambiguity and misunderstanding; rather let's just list the codes we support so any code outside of the list can be understood as non supported or non originated from undici
There was a problem hiding this comment.
Agreed. I removed that note in 379617c so the section only documents the supported Undici error codes and does not speculate about unsupported ones.
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4856 +/- ##
=======================================
Coverage 86.11% 86.11%
=======================================
Files 115 115
Lines 45686 45686
=======================================
Hits 39343 39343
Misses 6343 6343 β View full report in Codecov by Harness. π New features to boost your workflow:
|
|
Review follow-up: the requested removal of the unsupported-error-code note is already included in Could a maintainer rerun that job or advise whether the documentation change needs any further adjustment before merge? |
379617c to
bf6723b
Compare
|
I also found and resolved the branch conflicts against current Validation: example syntax ( |
|
Fresh CI on rebased head The same failure appears on Ubuntu and Windows. This PR changes only |
The errors reference explains individual error classes but does not give readers a single view of timeout codes, their dispatcher settings, or how to configure those settings for
fetch.This adds a timeout-code table and a global-dispatcher example. The unsupported-code note requested for removal stays removed. The branch is rebased onto current
main, preserving the newer error-class reference and using current documentation links.Validation: the JavaScript example passes
node --check; its dispatcher options and error-code mapping were checked against the current implementation; relative Client.md links resolve;git diff --checkpasses. No runtime code changes. The previous Node.js 20/macOS job failure could not be investigated because its logs have expired (HTTP 410); fresh CI is needed on this head.