Skip to content

Discrepancies between error list and documentation #15038

Description

@maclover7

There are a few discrepancies between the errors defined in lib/internal/errors.js and those appearing in the documentation in doc/api/errors.md. The differences are outlined below (I compiled this list manually, and it's possible some errors are missing -- please comment if so!!), and this should be fairly straightforward to solve -- people would just need to submit PRs to fill in the missing documentation :)

cc @Trott


yes lib/internal/errors.js, no doc/api/errors.md

  • ERR_ASYNC_CALLBACK
  • ERR_ASYNC_TYPE
  • ERR_ENCODING_NOT_SUPPORTED
  • ERR_ENCODING_INVALID_ENCODED_DATA
  • ERR_HTTP_INVALID_CHAR
  • ERR_HTTP2_HEADER_REQUIRED
  • ERR_HTTP2_HEADERS_AFTER_RESPOND
  • ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH
  • ERR_INVALID_ASYNC_ID
  • ERR_NAPI_CONS_FUNCTION
  • ERR_NAPI_CONS_PROTOTYPE_OBJECT
  • ERR_PARSE_HISTORY_DATA
  • ERR_INVALID_PERFORMANCE_MARK
  • ERR_OUTOFMEMORY
  • ERR_TLS_CERT_ALTNAME_INVALID
  • ERR_TLS_DH_PARAM_SIZE
  • ERR_TLS_HANDSHAKE_TIMEOUT
  • ERR_TLS_RENEGOTIATION_FAILED
  • ERR_TLS_REQUIRED_SERVER_NAME
  • ERR_TLS_SESSION_ATTACK
  • ERR_TRANSFORM_ALREADY_TRANSFORMING
  • ERR_TRANSFORM_WITH_LENGTH_0
  • ERR_VALID_PERFORMANCE_ENTRY_TYPE

no lib/internal/errors.js, yes doc/api/errors.md

  • ERR_HTTP2_ERROR

Something else to consider is how to prevent this from happening in the future. I've been playing around with some ESLint stuff, but would appreciate people's thoughts on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.errorsIssues and PRs related to JavaScript errors originating in Node.js core.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions