Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/actions/user-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
};
Expand All @@ -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;
});
};
Expand Down
Loading