Skip to content

app/likes/page.tsx: eight unwrap() calls in Promise.all crash the Likes page on any single source failure #179

Description

@ooloth

Current state

app/likes/page.tsx calls .unwrap() on eight concurrent data-fetch results inside Promise.all (lines 13–35) with no surrounding try/catch. A single failure from Notion, TMDB, or iTunes causes an unhandled exception that crashes the entire Likes page, surfacing Next.js's raw error boundary to users instead of a graceful degradation. All eight sources failing simultaneously is unlikely, but any one of them is sufficient to take down the whole page.

Ideal state

  • A failure in any single data source does not crash the entire Likes page
  • Each failed source degrades gracefully (e.g. returns []) so the remaining categories still render
  • Errors from individual sources are logged at error level with the source name before the empty fallback is used

Out of scope

  • Retrying failed source requests
  • Surfacing partial failures to the user via UI messaging

Starting points

  • app/likes/page.tsx lines 13–35 — the Promise.all block with eight .unwrap() calls

QA plan

  1. Temporarily cause one source fetch to return an Err result (e.g. set an invalid TMDB API token in the environment)
  2. Navigate to /likes — expect the page to render with the other categories intact, not a full-page error boundary
  3. Check the server logs — expect an error entry naming the source that failed and the error message
  4. Restore valid credentials — expect all eight categories to render normally

Done when

A single source failure in app/likes/page.tsx produces a logged error and an empty result for that category without crashing the page.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions