Skip to content

Commit c56310a

Browse files
committed
add note about SentryError prototype
1 parent 7a4e866 commit c56310a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/utils/src/error.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export class SentryError extends Error {
1111
super(message);
1212

1313
this.name = new.target.prototype.constructor.name;
14+
// This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line
15+
// out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes
16+
// instances of `SentryError` fail `obj instanceof SentryError` checks.
1417
Object.setPrototypeOf(this, new.target.prototype);
1518
this.logLevel = logLevel;
1619
}

0 commit comments

Comments
 (0)