JamesReviewsMusic
JRM-8Handle failed responses in fetchArtistFromSpotify
Description
fetchArtistFromSpotify (backend/src/helpers/fetchArtistFromSpotify.ts) never checks response.ok. If Spotify returns a 404 or a 429, the error JSON gets cast to SpotifyArtist and flows into the image comparison logic in the artist image update job, producing garbage instead of a visible failure.
- Check
response.okand return null (or throw) on failure so the caller's existing null handling kicks in - Drop the redundant
urlparameter, every caller builds it from theidthey already pass in
Sub-tickets
0No sub-tickets yet.
Links
No links.
Comments
0No comments yet.