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:
parent
e8ee0f5de9
commit
5a6245d822
3 changed files with 49 additions and 1 deletions
47
crates/archivr-server/static/assets/index-D1LSSXsT.js
Normal file
47
crates/archivr-server/static/assets/index-D1LSSXsT.js
Normal file
File diff suppressed because one or more lines are too long
1
crates/archivr-server/static/assets/index-DKombv9L.css
Normal file
1
crates/archivr-server/static/assets/index-DKombv9L.css
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -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),
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue