Fix crash with tapo cameras not returning 201

This commit is contained in:
Josip Janzic
2024-02-23 16:39:29 +00:00
parent 5fa31fe4d6
commit 14a9763c73
+1 -1
View File
@@ -281,7 +281,7 @@ func dial(req *http.Request) (net.Conn, *http.Response, error) {
auth := res.Header.Get("WWW-Authenticate")
if res.StatusCode != http.StatusUnauthorized || !strings.HasPrefix(auth, "Digest") {
return nil, nil, err
return nil, nil, fmt.Errorf("Expected StatusCode to be %d, received %d", http.StatusUnauthorized, res.StatusCode)
}
if password == "" {