fix(errors,a11y): review round 1 — drop redundant onErrors, stabilize the live region
Review found my C-3.23 additions double-notified: the global error modal (api.ts req) already surfaces 400/409/422/500 with the backend's specific message, so a caller toast on those codes is a second, weaker surface. Only 403/404 are caller-handled and silent — and only a YouTube WRITE action has a meaningful 403 (missing scope). So the correct set is just the ChannelPage unsubscribe handler (a YouTube write, 403 → "connect", matching subscribe). Reverted the redundant onErrors on block (a local DB op, not YouTube), SettingsPanel Plex watch toggle/reimport, and the DownloadCenter job action — the global modal already speaks for them. Removed the three now-unused keys. Toaster: moved the polite live region onto the stable, always-mounted container (a polite region must pre-exist to announce later insertions); error/fatal toasts keep role="alert", which announces on insertion regardless.
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user