Skip to content

Commit

Permalink
chore: skip model.getModeId error in Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Jan 27, 2023
1 parent 5bafd43 commit 12e18ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/redux/reducers/appConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,11 @@ export const configSlice = createSlice({
dsn: action.payload.SENTRY_DSN,
tracesSampleRate: 0.6,
beforeSend: event => {
// TODO: Skip errors related to model.getModeId for now, should fix in 2.0
// also why is it model.getModeId and not model.getModelId? is it a typo?
if (event.exception?.values?.some(v => v.value?.includes('model.getModeId'))) {
return null;
}
// we have to get this from electron store to get the most updated value
// because the state object in this action is a snapshot of the state at the moment of executing the reducer
const disableErrorReporting = electronStore.get('appConfig.disableErrorReporting');
Expand Down

0 comments on commit 12e18ed

Please sign in to comment.