Skip to content

ERR_TLS_RENEGOTIATE, ERR_HTTP2_SETTINGS_CANCEL are not defined #21440

Closed
@ChALkeR

Description

@ChALkeR

While taking a look at #21435 / #21421, I did a quick and dirty check which errors are being instantiated and /lib and checked what happened.

  1. ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK seems to be used in loader, but never defined.

    ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK,
    ERR_UNKNOWN_MODULE_FORMAT
    } = require('internal/errors').codes;
    if (typeof this._dynamicInstantiate !== 'function')
    throw new ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK();
    Not defined in lib/internal/errors.js.

  2. ERR_TLS_RENEGOTIATE seems to be used in tls, but never defined.

    node/lib/_tls_wrap.js

    Lines 47 to 52 in b56f65e

    ERR_TLS_RENEGOTIATE,
    ERR_TLS_RENEGOTIATION_DISABLED,
    ERR_TLS_REQUIRED_SERVER_NAME,
    ERR_TLS_SESSION_ATTACK,
    ERR_TLS_SNI_FROM_SERVER
    } = require('internal/errors').codes;

    node/lib/_tls_wrap.js

    Lines 572 to 574 in b56f65e

    if (callback) {
    process.nextTick(callback, new ERR_TLS_RENEGOTIATE());
    }
    Not defined in lib/internal/errors.js.

  3. ERR_HTTP2_SETTINGS_CANCEL seems to be used in http2, but never defined.

    ERR_HTTP2_SETTINGS_CANCEL,
    ERR_HTTP2_SOCKET_BOUND,
    ERR_HTTP2_STATUS_101,
    ERR_HTTP2_STATUS_INVALID,
    ERR_HTTP2_STREAM_CANCEL,
    ERR_HTTP2_STREAM_ERROR,
    ERR_HTTP2_STREAM_SELF_DEPENDENCY,
    ERR_HTTP2_TRAILERS_ALREADY_SENT,
    ERR_HTTP2_TRAILERS_NOT_READY,
    ERR_HTTP2_UNSUPPORTED_PROTOCOL,
    ERR_INVALID_ARG_TYPE,
    ERR_INVALID_CALLBACK,
    ERR_INVALID_CHAR,
    ERR_INVALID_OPT_VALUE,
    ERR_OUT_OF_RANGE,
    ERR_SOCKET_CLOSED
    }
    } = require('internal/errors');
    if (typeof cb === 'function')
    cb(new ERR_HTTP2_SETTINGS_CANCEL());
    Not defined in lib/internal/errors.js.

This probably affects all 10.x versions, but was not backported to earlier branches as is a semver-major.

Blame points at 1d2fd8b / #19137.

/cc @targos

This also probably needs a testcase when fixed, I do not have one atm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.errorsIssues and PRs related to JavaScript errors originated in Node.js core.esmIssues and PRs related to the ECMAScript Modules implementation.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.http2Issues or PRs related to the http2 subsystem.tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions