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:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user