Skip to content

Commit 6adb825

Browse files
committed
From review: hide internal frames from QUIC errors
1 parent 60b6e3b commit 6adb825

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/internal/quic/quic.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const {
99
ArrayPrototypePush,
1010
BigInt,
1111
DataViewPrototypeGetByteLength,
12+
ErrorCaptureStackTrace,
1213
FunctionPrototypeBind,
1314
Number,
1415
ObjectDefineProperties,
@@ -986,6 +987,7 @@ function makeQuicError(code, prefix, type, errorCode, reason, errorName) {
986987
const err = new QuicError(
987988
quicErrorMessage(prefix, errorCode, reason, errorName),
988989
{ errorCode, code, type });
990+
ErrorCaptureStackTrace(err, makeQuicError);
989991
if (reason) err.reason = reason;
990992
if (errorName) err.errorName = errorName;
991993
return err;

0 commit comments

Comments
 (0)