summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordavidmarkclements <huperekchuno@googlemail.com>2018-04-04 19:36:04 +0200
committerMatteo Collina <hello@matteocollina.com>2018-04-09 13:29:48 +0200
commitef07d6570f1c6345b7f991ca2d986dec6a481350 (patch)
treefd6b6912a54225abebb5246b1403b462d3e07f23 /lib
parentadd1c02bda14be1e00f92ef1e7b2c155abaeeeae (diff)
downloadandroid-node-v8-ef07d6570f1c6345b7f991ca2d986dec6a481350.tar.gz
android-node-v8-ef07d6570f1c6345b7f991ca2d986dec6a481350.tar.bz2
android-node-v8-ef07d6570f1c6345b7f991ca2d986dec6a481350.zip
errors: change ERR_HTTP2_HEADER_SINGLE_VALUE to TypeError
changes the base instance for ERR_HTTP2_HEADER_SINGLE_VALUE from Error to TypeError as a more accurate representation of the error. Additionally corrects the grammar of the error message. PR-URL: https://github.com/nodejs/node/pull/19805 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/errors.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/internal/errors.js b/lib/internal/errors.js
index f7c444afb2..99ffb46783 100644
--- a/lib/internal/errors.js
+++ b/lib/internal/errors.js
@@ -718,9 +718,8 @@ E('ERR_HTTP2_HEADERS_AFTER_RESPOND',
'Cannot specify additional headers after response initiated', Error);
E('ERR_HTTP2_HEADERS_SENT', 'Response has already been initiated.', Error);
-// This should probably be a `TypeError`.
E('ERR_HTTP2_HEADER_SINGLE_VALUE',
- 'Header field "%s" must have only a single value', Error);
+ 'Header field "%s" must only have a single value', TypeError);
E('ERR_HTTP2_INFO_STATUS_NOT_ALLOWED',
'Informational status codes cannot be used', RangeError);