undici
undici copied to clipboard
docs(errors): clarify timeout error codes and related options
Summary
This improves timeout-related error documentation in docs/docs/api/Errors.md.
It adds:
- a dedicated timeout error section that maps codes to when they are thrown
- direct links from each timeout code to the relevant configuration options (
connect.timeout,headersTimeout,bodyTimeout) - a note clarifying that
UND_ERR_SOCKET_TIMEOUTis not an Undici error code - a
fetch-oriented example showing how to configure timeouts viasetGlobalDispatcher
This is intended to make issues like UND_ERR_*_TIMEOUT easier to understand and act on, especially for users coming from fetch.
Closes #1865.
Testing
- Documentation-only change.
npm run lintwas attempted locally before dependencies were installed, so eslint was not available in this environment.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 93.15%. Comparing base (0bf0a2a) to head (379617c).
:warning: Report is 6 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4856 +/- ##
=======================================
Coverage 93.14% 93.15%
=======================================
Files 109 109
Lines 34239 34254 +15
=======================================
+ Hits 31893 31910 +17
+ Misses 2346 2344 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.