summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-outgoing-proto.js
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2017-11-03 20:04:12 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2017-11-06 18:24:34 +0800
commit0a84e95cd9293bfcf1e746857921684f0732dd60 (patch)
tree719f4113cd1c7dad36b324ef075ed069fc2f8b45 /test/parallel/test-http-outgoing-proto.js
parent11a9f36cae0d1e6e11c9f40ec82d9f887aa0a911 (diff)
downloadandroid-node-v8-0a84e95cd9293bfcf1e746857921684f0732dd60.tar.gz
android-node-v8-0a84e95cd9293bfcf1e746857921684f0732dd60.tar.bz2
android-node-v8-0a84e95cd9293bfcf1e746857921684f0732dd60.zip
http: improve errors thrown in header validation
PR-URL: https://github.com/nodejs/node/pull/16719 Fixes: https://github.com/nodejs/node/issues/16714 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http-outgoing-proto.js')
-rw-r--r--test/parallel/test-http-outgoing-proto.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-http-outgoing-proto.js b/test/parallel/test-http-outgoing-proto.js
index 22eba0981f..7db252dfbf 100644
--- a/test/parallel/test-http-outgoing-proto.js
+++ b/test/parallel/test-http-outgoing-proto.js
@@ -34,9 +34,9 @@ assert.throws(() => {
const outgoingMessage = new OutgoingMessage();
outgoingMessage.setHeader('test');
}, common.expectsError({
- code: 'ERR_MISSING_ARGS',
+ code: 'ERR_HTTP_INVALID_HEADER_VALUE',
type: TypeError,
- message: 'The "value" argument must be specified'
+ message: 'Invalid value "undefined" for header "test"'
}));
assert.throws(() => {