fix(api): exception after refreshing spotify access token

This commit is contained in:
Julian Tölle 2020-11-18 21:13:16 +01:00
parent 59307a8a2e
commit 49b31e8e62

View file

@ -53,7 +53,17 @@ export class SpotifyService {
accessToken,
});
await this.processUser(user, false);
} else {
// TODO sent to sentry
console.error(
"Unexpected error while fetching recently played tracks",
err
);
}
// Makes no sense to keep processing the (inexistant) data but if we throw
// the error the fetch loop will not process other users.
return;
}
if (playHistory.length === 0) {