summaryrefslogtreecommitdiff
path: root/test/simple/test-http-client-parse-error.js
diff options
context:
space:
mode:
authorFelix Geisendörfer <felix@debuggable.com>2011-12-18 15:55:40 +0100
committerisaacs <i@izs.me>2012-03-19 19:00:16 -0700
commit18240193ba421695d984c3d73e88de7e1b324e0a (patch)
tree9272cc0d8b51c5ff63f04b855975e1733f29ff5e /test/simple/test-http-client-parse-error.js
parent891f9defeb9713d8da9428195ad594a6d3627400 (diff)
downloadnode-new-18240193ba421695d984c3d73e88de7e1b324e0a.tar.gz
Expose http parse error codes
Currently http parse errors do not expose the error details available from http_parser. This patch exposes the error code as `err.code`.
Diffstat (limited to 'test/simple/test-http-client-parse-error.js')
-rw-r--r--test/simple/test-http-client-parse-error.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/simple/test-http-client-parse-error.js b/test/simple/test-http-client-parse-error.js
index 1ca7d58f78..91baa4706e 100644
--- a/test/simple/test-http-client-parse-error.js
+++ b/test/simple/test-http-client-parse-error.js
@@ -48,6 +48,7 @@ srv.listen(common.PORT, '127.0.0.1', function() {
console.log('got error from client');
srv.close();
assert.ok(e.message.indexOf('Parse Error') >= 0);
+ assert.equal(e.code, 'HPE_INVALID_CONSTANT');
parseError = true;
});
});