summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/errors.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/internal/errors.ts')
-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",
);