Skip to content

Commit 1912867

Browse files
authored
fix: Make sure that message exist before returning it in angular error handler (#2903)
1 parent 3fc76dd commit 1912867

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular/src/errorhandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class SentryErrorHandler implements AngularErrorHandler {
109109
}
110110

111111
// ... or an`ErrorEvent`, which can provide us with the message but no stack...
112-
if (error.error instanceof ErrorEvent) {
112+
if (error.error instanceof ErrorEvent && error.error.message) {
113113
return error.error.message;
114114
}
115115

0 commit comments

Comments
 (0)