You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
masterContext
There is an ongoing effort to migrate all JS expectations throws by
nodecore to have a.codeproperty. 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 innode@v8.0.0, some have landed inmastersince, and some have yet to be migrated. Hence it can't be asserted thatnodecore will only throw errors with an error-code, and so we have to assume the existence of userland code that depends onerror.messageparsing.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
guides/using-internal-errors.mdinternal/errors: improve ERR_INVALID_ARG_TYPE #13730 (comment)

internal/errors: improve ERR_INVALID_ARG_TYPE #13730 (comment) (landed as

semver-patchbut markeddon't land on v8.xuntil discoution is concluded)errors: improve invalid arg type #13834 (comment)

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