Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(spotifyapi)!: TypeError: Cannot read properties of null ('album') #40

Open
Jahme opened this issue Jan 10, 2023 · 0 comments
Open

Comments

@Jahme
Copy link
Collaborator

Jahme commented Jan 10, 2023

/app/routes/playback.js:37
const smallestAlbumImage = data.body.item.album.images.reduce(
^
TypeError: Cannot read properties of null (reading 'album')
at /app/routes/playback.js:37:53
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Effect: Deployment crashes.

Description:
When fetching playback state, sometimes the data retrieved from Spotify API does not acquire all the information.

Proposed Solution:
Implement better handling in the case a Spotify API request is not fulfilled properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant