diff --git a/frontend/src/components/ChannelPage.tsx b/frontend/src/components/ChannelPage.tsx index 073e5b15..4005cc2e 100644 --- a/frontend/src/components/ChannelPage.tsx +++ b/frontend/src/components/ChannelPage.tsx @@ -120,7 +120,9 @@ export default function ChannelPage({ qc.invalidateQueries({ queryKey: ["feed"] }); qc.invalidateQueries({ queryKey: ["blocked-channels"] }); }, - onError: (err) => notifyYouTubeActionError(err, t("channels.notify.blockFailed")), + // No onError: block/unblock is a local DB op (not a YouTube write, so no 403 "connect" case), + // and its 400/409/422/500 are already surfaced by the global error modal (see api.ts req) — + // a caller toast here would just double it. }); const subscribe = useMutation({ diff --git a/frontend/src/components/DownloadCenter.tsx b/frontend/src/components/DownloadCenter.tsx index 057ae59b..8e3f91ac 100644 --- a/frontend/src/components/DownloadCenter.tsx +++ b/frontend/src/components/DownloadCenter.tsx @@ -681,7 +681,8 @@ export default function DownloadCenter() { ? api.cancelDownload(id) : api.deleteDownload(id), onSuccess: invalidate, - onError: () => notify({ level: "error", message: t("downloads.actionFailed") }), + // No onError: a failed job action returns 400/409/422/500, already surfaced by the global + // error modal (api.ts req) with the backend's specific message — a caller toast would double it. }); // Remove a shared-with-me item from your list (only your grant; the owner's file is untouched). diff --git a/frontend/src/components/SettingsPanel.tsx b/frontend/src/components/SettingsPanel.tsx index f0a5d04f..58604c9d 100644 --- a/frontend/src/components/SettingsPanel.tsx +++ b/frontend/src/components/SettingsPanel.tsx @@ -533,14 +533,15 @@ function PlexWatchSync() { } }; - const onFail = () => notify({ level: "error", message: t("settings.plexSync.failed") }); + // No onError on these: they're Plex, not YouTube (notifyYouTubeActionError would wrongly say + // "connect YouTube"), and their 409/500 are already surfaced by the global error modal — a caller + // toast would double it. Actual import failures come back as 200 {error}, handled by announce. const toggle = useMutation({ mutationFn: (next: boolean) => api.plexWatchSetLink(next), onSuccess: (res) => { qc.setQueryData(["plex-watch-link"], res); announce(res.import); }, - onError: onFail, }); const reimport = useMutation({ mutationFn: () => api.plexWatchImport(), @@ -548,7 +549,6 @@ function PlexWatchSync() { qc.setQueryData(["plex-watch-link"], res); announce(res.import); }, - onError: onFail, }); const busy = toggle.isPending || reimport.isPending; diff --git a/frontend/src/components/Toaster.tsx b/frontend/src/components/Toaster.tsx index bf0e3c54..02a6be86 100644 --- a/frontend/src/components/Toaster.tsx +++ b/frontend/src/components/Toaster.tsx @@ -16,17 +16,23 @@ export default function Toaster() { const toasts = useSyncExternalStore(subscribe, getActiveToasts, getActiveToasts); return ( -