JamesReviewsMusic
JRM-2Fix useAlbumStatus calling /api/albums/status which doesn't exist
Description
useAlbumStatus (frontend/src/hooks/useAlbumStatus.tsx) fetches /api/albums/status?ids=... but the actual backend route is /api/albums/scores. The request gets matched by GET /api/albums/:albumID with "status" as the album ID, which errors server-side and returns a 500. This happens on every visit to the search page.
The hook also hides the failure: isError is hardcoded to false and the data falls back to an empty array, so the scores for recently viewed albums never display and no error is shown anywhere.
- Point the score query at
/api/albums/scores - Remove the hardcoded
isError: falseand combine the error states of both queries so failures actually surface
Sub-tickets
0No sub-tickets yet.
Links
No links.
Comments
0No comments yet.