-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Filter non web-client error * bump version * update change log
- Loading branch information
Showing
8 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
Sentry.init({ | ||
beforeSend(event) { | ||
// Check if the error originates from the library's source files | ||
if (event.exception && event.exception.values) { | ||
const isLibraryError = event.exception.values.some((exception) => { | ||
return exception.stacktrace.frames.some((frame) => | ||
frame.filename.includes('inline/src'), | ||
); | ||
}); | ||
|
||
// If the error is from the library, send it to Sentry | ||
if (isLibraryError) { | ||
return event; | ||
} | ||
} | ||
// Otherwise, do not send the error | ||
return null; | ||
}, | ||
dsn: 'https://[email protected]/4507143981236224', | ||
integrations: [ | ||
Sentry.thirdPartyErrorFilterIntegration({ | ||
filterKeys: ['smileid-web-client'], | ||
behaviour: 'drop-error-if-exclusively-contains-third-party-frames', | ||
behaviour: 'drop-error-if-contains-third-party-frames', | ||
}), | ||
], | ||
tracesSampleRate: 0.05, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters