Skip to content

fix(types): align FetchError.errno with NodeJS ErrnoException#1875

Open
nthbotast wants to merge 1 commit intonode-fetch:mainfrom
nthbotast:fix-fetcherror-errno-type-1831
Open

fix(types): align FetchError.errno with NodeJS ErrnoException#1875
nthbotast wants to merge 1 commit intonode-fetch:mainfrom
nthbotast:fix-fetcherror-errno-type-1831

Conversation

@nthbotast
Copy link
Copy Markdown

@nthbotast nthbotast commented Mar 6, 2026

Summary

  • update FetchError.errno type from string to NodeJS.ErrnoException['errno']
  • keep type behavior aligned with Node's ErrnoException contract
  • adjust the existing type test snippet to accept both number and string errno values

Closes #1831

Validation

  • git diff --cached --check
  • ⚠️ npm run test-types currently fails in this ephemeral environment due to @types/node/http2.d.ts parser/type errors (toolchain mismatch), unrelated to this patch

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.

Why is FetchError.errno a string and not a number?

1 participant