diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index 88971d29..b8d8e86d 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -1135,7 +1135,11 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) { try { this.loading++; - for await (const delIds of dav.archiveFilesByIds(Array.from(this.selection.keys()), !this.routeIsArchive())) { + for await (let delIds of dav.archiveFilesByIds(Array.from(this.selection.keys()), !this.routeIsArchive())) { + delIds = delIds.filter(x => x); + if (delIds.length === 0) { + continue + } const delPhotos = delIds.map(id => this.selection.get(id)); await this.deleteFromViewWithAnimation(delPhotos); } diff --git a/src/services/DavRequests.ts b/src/services/DavRequests.ts index 017c3312..005ad75c 100644 --- a/src/services/DavRequests.ts +++ b/src/services/DavRequests.ts @@ -245,8 +245,9 @@ export async function archiveFile(fileid: number, archive: boolean) { await archiveFile(id, archive); return id as number; } catch (error) { - console.error('Failed to archive', id, error); - showError(t('memories', 'Failed to archive some files.')); + console.error('Failed to (un)archive', id, error); + const msg = error?.response?.data?.message || t('memories', 'General Failure'); + showError(t('memories', 'Error: {msg}', { msg })); return 0; } });