fix(errors): surface four mutations that failed silently (C-3.23)
House policy: user actions must report failure. Added onError to: - ChannelPage block + unsubscribe → notifyYouTubeActionError (a 403 = missing YT scope shows the connect message; else the translated fallback); - SettingsPanel PlexWatchSync toggle + reimport → a plain error notify (these are Plex, not YouTube, so notifyYouTubeActionError's "connect YouTube" would mislead); - DownloadCenter job action (pause/resume/cancel/delete) → a plain error notify. New keys (HU+EN): channels.notify.blockFailed, settings.plexSync.failed, downloads.actionFailed.
This commit is contained in:
@@ -533,12 +533,14 @@ function PlexWatchSync() {
|
||||
}
|
||||
};
|
||||
|
||||
const onFail = () => notify({ level: "error", message: t("settings.plexSync.failed") });
|
||||
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(),
|
||||
@@ -546,6 +548,7 @@ function PlexWatchSync() {
|
||||
qc.setQueryData(["plex-watch-link"], res);
|
||||
announce(res.import);
|
||||
},
|
||||
onError: onFail,
|
||||
});
|
||||
|
||||
const busy = toggle.isPending || reimport.isPending;
|
||||
|
||||
Reference in New Issue
Block a user