From 4639ae655e9db396fdf4408961db59372334b69b Mon Sep 17 00:00:00 2001 From: Caleb Lloyd <2414837+caleblloyd@users.noreply.github.com> Date: Fri, 30 Aug 2024 13:46:17 -0400 Subject: fix(ext/node): session close during stream setup (#25170) Signed-off-by: Caleb Lloyd --- ext/node/polyfills/internal/errors.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/node/polyfills/internal') 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", ); -- cgit v1.2.3