print artist name instead of object in lastfm tracks error

This commit is contained in:
sentriz
2022-11-14 14:05:25 +00:00
parent bf3c13b568
commit ba283021c1

View File

@@ -541,7 +541,7 @@ func (c *Controller) ServeGetTopSongs(r *http.Request) *spec.Response {
return spec.NewError(0, "fetching artist top tracks: %v", err)
}
if len(topTracks.Tracks) == 0 {
return spec.NewError(70, "no top tracks found for artist: %v", artist)
return spec.NewError(70, "no top tracks found for artist: %s", artist.Name)
}
topTrackNames := make([]string, len(topTracks.Tracks))
@@ -562,7 +562,7 @@ func (c *Controller) ServeGetTopSongs(r *http.Request) *spec.Response {
return spec.NewError(0, "error finding tracks: %v", err)
}
if len(tracks) == 0 {
return spec.NewError(70, "no tracks found matchind last fm top songs for artist: %v", artist)
return spec.NewError(70, "no tracks found matching last fm top songs for artist: %s", artist.Name)
}
sub := spec.NewResponse()