Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: is the stability guarantee of err.code documented anywhere? #23975

Closed
joyeecheung opened this issue Oct 30, 2018 · 3 comments
Closed

doc: is the stability guarantee of err.code documented anywhere? #23975

joyeecheung opened this issue Oct 30, 2018 · 3 comments
Assignees
Labels
doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core.

Comments

@joyeecheung
Copy link
Member

joyeecheung commented Oct 30, 2018

Surprisingly I cannot find in any significant places in https://github.com/nodejs/node/blob/master/doc/api/errors.md that err.code provides a stronger stability guarantee and should be preferred over parsing err.mesage. Am I missing something?

This is something that a lot of Node.js collaborators know, I am sure, but if we don't put it in a significant place in the docs (e.g. with examples), the users may not be able to be sure about that.

cc @jasnell

@joyeecheung joyeecheung added doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Oct 30, 2018
@Trott
Copy link
Member

Trott commented Nov 4, 2018

That whole section of the docs can use a pretty massive cleanup. I'm on it.

@Trott Trott self-assigned this Nov 4, 2018
@Trott
Copy link
Member

Trott commented Nov 4, 2018

#24090

Trott added a commit to Trott/io.js that referenced this issue Nov 4, 2018
Trott added a commit to Trott/io.js that referenced this issue Nov 7, 2018
Simplify text. Add explanation that `code` is the most stable way to
identify an error, in contrast with `message` which is subject to change
between patch-level versions of Node.js. Synchronize list of properties
with text. Order properties alphabetically.

PR-URL: nodejs#24090
Fixes: nodejs#23975
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Trott added a commit to Trott/io.js that referenced this issue Nov 7, 2018
Fixes: nodejs#23975

PR-URL: nodejs#24090
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@Trott
Copy link
Member

Trott commented Nov 7, 2018

Fixed in 1368eb8

@Trott Trott closed this as completed Nov 7, 2018
BridgeAR pushed a commit that referenced this issue Nov 14, 2018
Simplify text. Add explanation that `code` is the most stable way to
identify an error, in contrast with `message` which is subject to change
between patch-level versions of Node.js. Synchronize list of properties
with text. Order properties alphabetically.

PR-URL: #24090
Fixes: #23975
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BridgeAR pushed a commit that referenced this issue Nov 14, 2018
Fixes: #23975

PR-URL: #24090
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
kiyomizumia pushed a commit to kiyomizumia/node that referenced this issue Nov 15, 2018
Simplify text. Add explanation that `code` is the most stable way to
identify an error, in contrast with `message` which is subject to change
between patch-level versions of Node.js. Synchronize list of properties
with text. Order properties alphabetically.

PR-URL: nodejs#24090
Fixes: nodejs#23975
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
kiyomizumia pushed a commit to kiyomizumia/node that referenced this issue Nov 15, 2018
Fixes: nodejs#23975

PR-URL: nodejs#24090
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
codebytere pushed a commit that referenced this issue Nov 29, 2018
Simplify text. Add explanation that `code` is the most stable way to
identify an error, in contrast with `message` which is subject to change
between patch-level versions of Node.js. Synchronize list of properties
with text. Order properties alphabetically.

PR-URL: #24090
Fixes: #23975
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
codebytere pushed a commit that referenced this issue Nov 29, 2018
Fixes: #23975

PR-URL: #24090
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 29, 2018
Simplify text. Add explanation that `code` is the most stable way to
identify an error, in contrast with `message` which is subject to change
between patch-level versions of Node.js. Synchronize list of properties
with text. Order properties alphabetically.

PR-URL: #24090
Fixes: #23975
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 29, 2018
Fixes: #23975

PR-URL: #24090
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins pushed a commit that referenced this issue Dec 3, 2018
Simplify text. Add explanation that `code` is the most stable way to
identify an error, in contrast with `message` which is subject to change
between patch-level versions of Node.js. Synchronize list of properties
with text. Order properties alphabetically.

PR-URL: #24090
Fixes: #23975
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins pushed a commit that referenced this issue Dec 3, 2018
Fixes: #23975

PR-URL: #24090
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants