Skip to content

Commit

Permalink
Added error check to pass golint
Browse files Browse the repository at this point in the history
  • Loading branch information
LumePart committed Feb 1, 2024
1 parent 34a7155 commit 0954a77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion listenbrainz.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ func getTracks(mbids []string) Track {

body := lbRequest(fmt.Sprintf("metadata/recording/?recording_mbids=%s&inc=release", str_mbids))

json.Unmarshal(body, &recordings)
err := json.Unmarshal(body, &recordings)
if err != nil {
log.Fatalf("Failed to unmarshal body: %v", err)
}

for _, recording := range recordings {
tracks = append(tracks, struct {
Expand Down

0 comments on commit 0954a77

Please sign in to comment.