diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-02-23 22:28:29 +0100 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2018-03-04 13:52:31 +0100 |
commit | 7bc8eb8da7ccdcd67edaf612b6599ec04ab77cb1 (patch) | |
tree | 49760a75c64906b4b959be477d923b11416c3ca4 /test/parallel/test-http2-compat-serverresponse-destroy.js | |
parent | f2b9805f85d3ff770892b37944a0890e0e60ca78 (diff) | |
download | node-new-7bc8eb8da7ccdcd67edaf612b6599ec04ab77cb1.tar.gz |
http2: refer to stream errors by name
Display the constant name instead of a stream error code
in the error message, because the numerical codes give absolutely
no clue about what happened when an error is emitted.
PR-URL: https://github.com/nodejs/node/pull/18966
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'test/parallel/test-http2-compat-serverresponse-destroy.js')
-rw-r--r-- | test/parallel/test-http2-compat-serverresponse-destroy.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-http2-compat-serverresponse-destroy.js b/test/parallel/test-http2-compat-serverresponse-destroy.js index f890346dbf..8ee52a74ab 100644 --- a/test/parallel/test-http2-compat-serverresponse-destroy.js +++ b/test/parallel/test-http2-compat-serverresponse-destroy.js @@ -58,7 +58,7 @@ server.listen(0, common.mustCall(() => { req.on('error', common.expectsError({ code: 'ERR_HTTP2_STREAM_ERROR', type: Error, - message: 'Stream closed with error code 2' + message: 'Stream closed with error code NGHTTP2_INTERNAL_ERROR' })); req.on('close', common.mustCall(() => countdown.dec())); @@ -73,7 +73,7 @@ server.listen(0, common.mustCall(() => { req.on('error', common.expectsError({ code: 'ERR_HTTP2_STREAM_ERROR', type: Error, - message: 'Stream closed with error code 2' + message: 'Stream closed with error code NGHTTP2_INTERNAL_ERROR' })); req.on('close', common.mustCall(() => countdown.dec())); |