Improve fetch TLS certificate error messages#5326
Closed
Will-thom wants to merge 1 commit into
Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5326 +/- ##
==========================================
+ Coverage 93.21% 93.22% +0.01%
==========================================
Files 110 110
Lines 36598 36615 +17
==========================================
+ Hits 34115 34136 +21
+ Misses 2483 2479 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mcollina
requested changes
May 26, 2026
Member
mcollina
left a comment
There was a problem hiding this comment.
I think this is spec mandated. @KhafraDev
KhafraDev
requested changes
May 27, 2026
Member
KhafraDev
left a comment
There was a problem hiding this comment.
It's not spec mandated (other than having to throw a TypeError), but there are a number of libraries that check for the error message 'fetch failed', which this change would break. is-network-error is one of the largest ones.
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.
Fixes #2199.
This keeps the fetch TypeError shape and cause intact while surfacing TLS certificate verification details in the top-level error message for known certificate-related failures.
Tests:
Note: npm run build:node could not be executed in this Windows sandbox because npm/esbuild attempted to access a denied path outside the workspace before compiling.