Skip to content
This repository was archived by the owner on Jun 16, 2022. It is now read-only.

Commit 489fcf0

Browse files
grelambertkevin
authored andcommitted
don't reportError if it's not instance of error (#1865)
see getsentry/sentry-javascript#2292
1 parent 1274361 commit 489fcf0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/logger.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export default {
88
critical: (e: Error) => {
99
if (Config.DEBUG_ERROR) console.error(e);
1010
else console.log(e);
11-
Sentry.captureException(e);
11+
if (e instanceof Error) {
12+
Sentry.captureException(e);
13+
}
1214
},
1315
};

0 commit comments

Comments
 (0)