aboutsummaryrefslogtreecommitdiff
path: root/src/graphql/anime/resolvers.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-06-02 00:09:50 +0000
committerFuwn <[email protected]>2026-06-02 00:09:50 +0000
commitb6da8e8474b7a1d0b951b25f4936f039197ff84b (patch)
tree7a495d3a5d2098fced9be68818e755ed6d757108 /src/graphql/anime/resolvers.ts
parentfix(security): sanitize third-party RSS HTML before {@html} (diff)
downloaddue.moe-b6da8e8474b7a1d0b951b25f4936f039197ff84b.tar.xz
due.moe-b6da8e8474b7a1d0b951b25f4936f039197ff84b.zip
fix(updates): isolate feed failures so one feed can't break the page
onMount fetched the novel feed then the manga feed, each via `(await fetch(...)).json()` with no error handling. When a feed endpoint failed (e.g. all-novels, when wlnupdates returns HTML), `.json()` threw and aborted onMount before the other feed loaded, leaving the whole page stuck on skeletons. Load each feed through a fetchJson helper that returns null on any failure (non-ok, network, or parse error) and set the feed to null — the existing "Failed to load feed" state — when the response is missing or malformed. A failing feed now degrades gracefully while the other still renders.
Diffstat (limited to 'src/graphql/anime/resolvers.ts')
0 files changed, 0 insertions, 0 deletions