Skip to content

Commit

Permalink
maybe return the body too
Browse files Browse the repository at this point in the history
  • Loading branch information
lostdusty committed Oct 9, 2024
1 parent 416b5ad commit 2e6a270
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gobalt.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ func GetYoutubePlaylist(playlist string) (Playlist, error) {
return nil, err
}
if getUrls.StatusCode != 200 {
return nil, fmt.Errorf("%v", getUrls.Status)
read, _ := io.ReadAll(getUrls.Body)
return nil, fmt.Errorf("%v\n%v", getUrls.Status, string(read))
}

unmarshalBody, err := io.ReadAll(getUrls.Body)
Expand Down

0 comments on commit 2e6a270

Please sign in to comment.