From 2e6a270541453cc77e21daba01f4b6051b5bb1ad Mon Sep 17 00:00:00 2001 From: lostdusty <47502554+lostdusty@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:59:46 -0300 Subject: [PATCH] maybe return the body too --- gobalt.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gobalt.go b/gobalt.go index 55fae1b..33e5e3e 100644 --- a/gobalt.go +++ b/gobalt.go @@ -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)