Skip to content

Commit f5ca443

Browse files
committed
Fix tesla build errors
1 parent 46d227b commit f5ca443

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

vehicle/config_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ func TestVehicles(t *testing.T) {
1818
"Missing required parameter", // Renault
1919
"error connecting: Network Error",
2020
"unexpected status: 401",
21-
"could not obtain token", // Porsche
21+
"could not obtain token", // Porsche
22+
"login failed: 400 Bad Request", // Tesla
2223
}
2324

2425
for _, tmpl := range test.ConfigTemplates("vehicle") {

vehicle/tesla.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package vehicle
22

33
import (
44
"errors"
5+
"fmt"
56
"net/http"
67
"strings"
78
"time"
@@ -58,7 +59,7 @@ func NewTeslaFromConfig(other map[string]interface{}) (api.Vehicle, error) {
5859
Password: cc.Password,
5960
})
6061
if err != nil {
61-
return nil, err
62+
return nil, fmt.Errorf("login failed: %w", err)
6263
}
6364

6465
vehicles, err := client.Vehicles()

0 commit comments

Comments
 (0)