summaryrefslogtreecommitdiff
path: root/lib/internal/http2/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/http2/util.js')
-rw-r--r--lib/internal/http2/util.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js
index f62d936025..0a3faa2355 100644
--- a/lib/internal/http2/util.js
+++ b/lib/internal/http2/util.js
@@ -10,6 +10,8 @@ const {
} = require('internal/errors').codes;
const kSocket = Symbol('socket');
+const kProxySocket = Symbol('proxySocket');
+const kRequest = Symbol('request');
const {
NGHTTP2_SESSION_CLIENT,
@@ -499,12 +501,12 @@ class NghttpError extends Error {
}
}
-function assertIsObject(value, name, types = 'Object') {
+function assertIsObject(value, name, types) {
if (value !== undefined &&
(value === null ||
typeof value !== 'object' ||
Array.isArray(value))) {
- const err = new ERR_INVALID_ARG_TYPE(name, types, value);
+ const err = new ERR_INVALID_ARG_TYPE(name, types || 'Object', value);
Error.captureStackTrace(err, assertIsObject);
throw err;
}
@@ -592,6 +594,8 @@ module.exports = {
getStreamState,
isPayloadMeaningless,
kSocket,
+ kProxySocket,
+ kRequest,
mapToHeaders,
NghttpError,
sessionName,