Fix (ratelimit) error handling
This commit is contained in:
parent
35629a3e13
commit
3634d6783e
1 changed files with 5 additions and 1 deletions
|
@ -83,7 +83,11 @@ namespace HiddenUpdater
|
|||
var artist = spotify.GetArtist((string) kv.Value["sid"]);
|
||||
var artJson = kv.Value;
|
||||
if (artist.HasError())
|
||||
Console.WriteLine(artist.Name + " - Error: " + artist.Error.Status + " - " + artist.Error.Message);
|
||||
{
|
||||
Console.WriteLine(kv.Value["sid"] + " - Error: " + artist.Error.Status + " - " + artist.Error.Message);
|
||||
Thread.Sleep(5000);
|
||||
artist = spotify.GetArtist((string) kv.Value["sid"]);
|
||||
}
|
||||
artJson["followers"] = artist?.Followers?.Total;
|
||||
artJson["popularity"] = artist?.Popularity;
|
||||
artJson["genres"] = new JArray(artist?.Genres);
|
||||
|
|
Loading…
Reference in a new issue