From 369bdd8f2b5defd450e6c30cb7fbac0e9592b13e Mon Sep 17 00:00:00 2001 From: Jordan Hotmann Date: Mon, 27 Nov 2023 16:47:50 -0700 Subject: [PATCH] Include resp body in error --- pkg/qbittorrent/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/qbittorrent/api.go b/pkg/qbittorrent/api.go index 0c92593..961aa2c 100644 --- a/pkg/qbittorrent/api.go +++ b/pkg/qbittorrent/api.go @@ -38,7 +38,7 @@ func (c *QbittorrentClient) Login(user string, pass string) error { authCookie := resp.Header().Get("set-cookie") if authCookie == "" { - return fmt.Errorf("auth cookie not found. Headers: %+v", resp.Header()) + return fmt.Errorf("auth cookie not found.\nResponse: %s\nHeaders: %+v", resp.Body(), resp.Header()) } first := strings.Split(authCookie, ";")[0]