1
0
Fork 0

Give response headers in error

main v0.12.1
Jordan Hotmann 2023-11-27 16:35:36 -07:00
parent f5745789f8
commit 66cac3ca0c
No known key found for this signature in database
GPG Key ID: 01B504170C2A2EA3
1 changed files with 1 additions and 2 deletions

View File

@ -1,7 +1,6 @@
package qbittorrent package qbittorrent
import ( import (
"errors"
"fmt" "fmt"
"net/http" "net/http"
"os" "os"
@ -39,7 +38,7 @@ func (c *QbittorrentClient) Login(user string, pass string) error {
authCookie := resp.Header().Get("set-cookie") authCookie := resp.Header().Get("set-cookie")
if authCookie == "" { 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] first := strings.Split(authCookie, ";")[0]