quic: add proper error codes & messages for QUIC failures#63198
Open
pimterry wants to merge 1 commit intonodejs:mainfrom
Open
quic: add proper error codes & messages for QUIC failures#63198pimterry wants to merge 1 commit intonodejs:mainfrom
pimterry wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Signed-off-by: Tim Perry <pimterry@gmail.com>
31b4709 to
aefee4f
Compare
jasnell
reviewed
May 8, 2026
|
|
||
| function makeQuicError(ErrorClass, prefix, type, errorCode, reason, errorName) { | ||
| const err = new ErrorClass( | ||
| quicErrorMessage(prefix, errorCode, reason, errorName)); |
Member
There was a problem hiding this comment.
We have the QuicError object, we should likely make use of it in here as well. The code can remain the same. No need to change it in this PR but for consistency, any error that includes the QUIC error code should use QuicError
jasnell
reviewed
May 8, 2026
| case NGTCP2_NO_VIABLE_PATH: | ||
| return "NO_VIABLE_PATH"; | ||
| case NGTCP2_VERSION_NEGOTIATION_ERROR: | ||
| return "VERSION_NEGOTIATION_ERROR"; |
Member
There was a problem hiding this comment.
Since this set is stable, we should just add them as strings on the quic BindingData to avoid having to create duplicate v8::String values.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63198 +/- ##
==========================================
- Coverage 90.04% 90.02% -0.02%
==========================================
Files 713 713
Lines 224926 224964 +38
Branches 42525 42526 +1
==========================================
- Hits 202526 202523 -3
- Misses 14180 14227 +47
+ Partials 8220 8214 -6
🚀 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 wraps QUIC errors, providing useful error codes and messages for the defined error code cases from both OpenSSL and ngtcp2.
Before this, QUIC errors looked like:
Now they look like: