Skip to content

Commit 1d8c500

Browse files
authored
feat(integrations): console.error is captured as an exception (#4034)
* feature: console.error is captured as an exception if passed through args contain an Error
1 parent 884dc89 commit 1d8c500

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/integrations/src/captureconsole.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ export class CaptureConsole implements Integration {
6262
scope.setExtra('arguments', args.slice(1));
6363
hub.captureMessage(message);
6464
}
65+
} else if (level === 'error' && args[0] instanceof Error) {
66+
hub.captureException(args[0]);
6567
} else {
6668
hub.captureMessage(message);
6769
}

0 commit comments

Comments
 (0)