From 7290e2fd58ce0aa8beb139c6225cd3910de136b7 Mon Sep 17 00:00:00 2001 From: Gabriel Horacio Cutrini Date: Tue, 5 May 2026 13:16:19 -0300 Subject: [PATCH] fix: suppress 412 Sentry noise on schedule add/remove 412 Precondition Failed is expected when users double-click the schedule button or real-time updates race with user actions. Skip Sentry.captureException for these cases to reduce noise. --- src/actions/user-actions.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; }); };