diff --git a/lib/internal/quic/core.js b/lib/internal/quic/core.js index edb1113a2c2964..2df63c2be67cdf 100644 --- a/lib/internal/quic/core.js +++ b/lib/internal/quic/core.js @@ -2389,7 +2389,6 @@ class QuicClientSession extends QuicSession { // If handle is a number, creating the session failed. if (typeof handle === 'number') { - let reason; switch (handle) { case ERR_FAILED_TO_CREATE_SESSION: throw new ERR_QUIC_FAILED_TO_CREATE_SESSION(); @@ -2398,7 +2397,7 @@ class QuicClientSession extends QuicSession { case ERR_INVALID_TLS_SESSION_TICKET: throw new ERR_QUIC_INVALID_TLS_SESSION_TICKET(); default: - throw new ERR_OPERATION_FAILED(`Unspecified reason [${reason}]`); + throw new ERR_OPERATION_FAILED(`Unspecified reason [${handle}]`); } }