mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-19 07:36:17 +00:00
fix(ui): expose resume failure reason
- show persisted resume failure details instead of a generic backend rejection - keep the generic message only when no actionable reason is available
This commit is contained in:
@@ -1877,7 +1877,11 @@ export const DownloadTable: React.FC<DownloadTableProps> = ({ filter, onSummaryC
|
||||
try {
|
||||
const resumed = await useDownloadStore.getState().resumeDownload(item.id);
|
||||
if (!resumed) {
|
||||
throw new Error(t($ => $.downloadTable.backendRejectedStart));
|
||||
const current = useDownloadStore.getState().downloads.find(
|
||||
download => download.id === item.id
|
||||
);
|
||||
const reason = current?.lastError?.trim();
|
||||
throw new Error(reason || t($ => $.downloadTable.backendRejectedStart));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to resume:", error);
|
||||
|
||||
Reference in New Issue
Block a user