1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-07-21 18:55:36 +02:00

fix(frontend): use Promise.allSettled in handleCaptured to prevent runs-fetch failure from poisoning successful captures

Promise.all rejects on the first failure. If the /runs refresh threw,
the rejection would propagate through startPolling's await and land in
the outer catch block, firing an error toast for a capture that had
already succeeded. Promise.allSettled settles unconditionally so a
transient runs fetch error is silently absorbed while the entry list
still refreshes.
This commit is contained in:
TheGeneralist 2026-07-20 14:25:51 +02:00
parent e8ee0f5de9
commit 5a6245d822
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
3 changed files with 49 additions and 1 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -436,7 +436,7 @@ export default function App() {
const handleCaptured = useCallback(() => {
if (!archiveId) return
return Promise.all([
return Promise.allSettled([
loadEntries(archiveId, searchQuery, tagFilter),
fetchRuns(archiveId).then(setRuns),
])