diff --git a/src/actions/user-actions.js b/src/actions/user-actions.js index b94cd479..c7c7ade2 100644 --- a/src/actions/user-actions.js +++ b/src/actions/user-actions.js @@ -234,7 +234,10 @@ export const addToSchedule = (event) => async (dispatch, getState) => { return event; }).catch(e => { console.log('ERROR: ', e); - Sentry.captureException(e) + // 412 is expected when event is already in schedule (double-click, race condition) + if (e?.response?.status !== 412) { + Sentry.captureException(e); + } return e; }); }; @@ -256,7 +259,10 @@ export const removeFromSchedule = (event) => async (dispatch, getState) => { return event; }).catch(e => { console.log('ERROR: ', e); - Sentry.captureException(e) + // 412 is expected when event is not in schedule (double-click, race condition) + if (e?.response?.status !== 412) { + Sentry.captureException(e); + } return e; }); };