diff --git a/doc/api/buffer.md b/doc/api/buffer.md
index 4902106a595de9..ad5b9b762e9909 100644
--- a/doc/api/buffer.md
+++ b/doc/api/buffer.md
@@ -288,6 +288,10 @@ It can be constructed in a variety of ways.
* `size` {integer} The desired length of the new `Buffer`.
Allocates a new `Buffer` of `size` bytes. If `size` is larger than
-[`buffer.constants.MAX_LENGTH`][] or smaller than 0, [`ERR_INVALID_OPT_VALUE`][]
+[`buffer.constants.MAX_LENGTH`][] or smaller than 0, [`ERR_INVALID_ARG_VALUE`][]
is thrown. A zero-length `Buffer` is created if `size` is 0.
The underlying memory for `Buffer` instances created in this way is *not
@@ -3274,7 +3287,7 @@ introducing security vulnerabilities into an application.
[`Buffer.poolSize`]: #buffer_class_property_buffer_poolsize
[`DataView`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
[`ERR_INVALID_BUFFER_SIZE`]: errors.html#ERR_INVALID_BUFFER_SIZE
-[`ERR_INVALID_OPT_VALUE`]: errors.html#ERR_INVALID_OPT_VALUE
+[`ERR_INVALID_ARG_VALUE`]: errors.html#ERR_INVALID_ARG_VALUE
[`ERR_OUT_OF_RANGE`]: errors.html#ERR_OUT_OF_RANGE
[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
[`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
diff --git a/doc/api/errors.md b/doc/api/errors.md
index e5b8a20e35a046..3a1b9468724a3f 100644
--- a/doc/api/errors.md
+++ b/doc/api/errors.md
@@ -1378,16 +1378,6 @@ An IP address is not valid.
The imported module string is an invalid URL, package name, or package subpath
specifier.
-
-### `ERR_INVALID_OPT_VALUE`
-
-An invalid or unexpected value was passed in an options object.
-
-
-### `ERR_INVALID_OPT_VALUE_ENCODING`
-
-An invalid or unknown file encoding was passed.
-
### `ERR_INVALID_PACKAGE_CONFIG`
@@ -2391,6 +2381,24 @@ Used when an invalid character is found in an HTTP response status message
-->
A given index was out of the accepted range (e.g. negative offsets).
+
+### `ERR_INVALID_OPT_VALUE`
+
+
+An invalid or unexpected value was passed in an options object.
+
+
+### `ERR_INVALID_OPT_VALUE_ENCODING`
+
+
+An invalid or unknown file encoding was passed.
+
### `ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`