From 161be13602701fcbcbd0a5d3b3868998204ff2ea Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 4 Nov 2018 14:29:45 -0800 Subject: [PATCH] doc: add text about error.code stability Fixes: https://github.com/nodejs/node/issues/23975 PR-URL: https://github.com/nodejs/node/pull/24090 Reviewed-By: Richard Lau Reviewed-By: Joyee Cheung --- doc/api/errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 264b7d0ea99e0b..575f77861fa0f2 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -260,7 +260,7 @@ not capture any frames. * {string} The `error.code` property is a string label that identifies the kind of error. -See [Node.js Error Codes][] for details about specific codes. +`error.code` is the most stable way to identify an error. It will only change between major versions of Node.js. In contrast, `error.message` strings may change between any versions of Node.js. See [Node.js Error Codes][] for details about specific codes. ### error.message