Skip to content

meta: semver impact of Error messages #13937

Closed
@refack

Description

@refack
  • Version: master
  • Platform: *
  • Subsystem: errors

Context

There is an ongoing effort to migrate all JS expectations throws by node core to have a .code property. The error code allows userland to react in different exceptions specific ways.
To that extent a new internal module (internal/errors) was created #11220 and the migration is tracked in #11273 (and to less extent in https://github.com/nodejs/node/projects/4) Some module migrations landed in node@v8.0.0, some have landed in master since, and some have yet to be migrated. Hence it can't be asserted that node core will only throw errors with an error-code, and so we have to assume the existence of userland code that depends on error.message parsing.

Issue

At present there seems to be a difference of opinions as to the semver level of changes in messages of internal/errors.

Action item

A consensus should be reached on this issue as we want to have a clear path forward, and unambiguous guidelines for contributors.

Relevant discussion

  1. guides/using-internal-errors.md
    image

  2. internal/errors: improve ERR_INVALID_ARG_TYPE #13730 (comment)
    image

  3. internal/errors: improve ERR_INVALID_ARG_TYPE #13730 (comment) (landed as semver-patch but marked don't land on v8.x until discoution is concluded)
    image

  4. errors: improve invalid arg type #13834 (comment)
    image

[EDIT by @Trott: don't land -> don't land on v8.x for clarity.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorsIssues and PRs related to JavaScript errors originated in Node.js core.metaIssues and PRs related to the general management of the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions