Add more info to logged message
This commit is contained in:
parent
047d13afd1
commit
fbcea12786
1 changed files with 4 additions and 1 deletions
|
|
@ -644,7 +644,10 @@ func fetchPiholeSessionID(instanceURL string, client *http.Client, password stri
|
|||
}
|
||||
|
||||
if jsonResponse.Session.SID == "" {
|
||||
return "", errors.New("authentication response returned empty session ID")
|
||||
return "", fmt.Errorf(
|
||||
"authentication response returned empty session ID, status code %d, message '%s'",
|
||||
response.StatusCode, jsonResponse.Session.Message,
|
||||
)
|
||||
}
|
||||
|
||||
return jsonResponse.Session.SID, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue