summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal
diff options
context:
space:
mode:
authorCaleb Lloyd <2414837+caleblloyd@users.noreply.github.com>2024-08-30 13:46:17 -0400
committerGitHub <noreply@github.com>2024-08-30 23:16:17 +0530
commit4639ae655e9db396fdf4408961db59372334b69b (patch)
tree2f661d5d296f07284e3a24907a34918f17e6df09 /ext/node/polyfills/internal
parentd71eebba0d1ddc43aaf1e0c41f459deebaddc9f7 (diff)
fix(ext/node): session close during stream setup (#25170)
Signed-off-by: Caleb Lloyd <caleblloyd@gmail.com>
Diffstat (limited to 'ext/node/polyfills/internal')
-rw-r--r--ext/node/polyfills/internal/errors.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/node/polyfills/internal/errors.ts b/ext/node/polyfills/internal/errors.ts
index 9e0905ef4..51bd7a025 100644
--- a/ext/node/polyfills/internal/errors.ts
+++ b/ext/node/polyfills/internal/errors.ts
@@ -2295,10 +2295,10 @@ export class ERR_HTTP2_INVALID_SETTING_VALUE extends NodeRangeError {
}
export class ERR_HTTP2_STREAM_CANCEL extends NodeError {
override cause?: Error;
- constructor(error: Error) {
+ constructor(error?: Error) {
super(
"ERR_HTTP2_STREAM_CANCEL",
- typeof error.message === "string"
+ error && typeof error.message === "string"
? `The pending stream has been canceled (caused by: ${error.message})`
: "The pending stream has been canceled",
);