From 66cac3ca0ce7fd92c82ff8b1861f14583fb0015f Mon Sep 17 00:00:00 2001 From: Jordan Hotmann Date: Mon, 27 Nov 2023 16:35:36 -0700 Subject: [PATCH] Give response headers in error --- pkg/qbittorrent/api.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/qbittorrent/api.go b/pkg/qbittorrent/api.go index adc5d54..0c92593 100644 --- a/pkg/qbittorrent/api.go +++ b/pkg/qbittorrent/api.go @@ -1,7 +1,6 @@ package qbittorrent import ( - "errors" "fmt" "net/http" "os" @@ -39,7 +38,7 @@ func (c *QbittorrentClient) Login(user string, pass string) error { authCookie := resp.Header().Get("set-cookie") if authCookie == "" { - return errors.New("auth cookie not found") + return fmt.Errorf("auth cookie not found. Headers: %+v", resp.Header()) } first := strings.Split(authCookie, ";")[0]