Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast fail 429 #243

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ in lieu of command-line flags when using the above applications:
* `TESLA_VIN` specifies a vehicle identification number. You can find your VIN
under Controls > Software in your vehicle's UI. (Despite the name, VINs
contain both letters and numbers).
* `TESLA_CACHE_FILE` specifies a file that caches session information. The
cache allows programs to skip sending handshake messages to a vehicle.

For example:

```bash
export TESLA_KEY_NAME=$(whoami)
export TESLA_TOKEN_NAME=$(whoami)
export TESLA_CACHE_FILE=~/.tesla-cache.json
```

At this point, you're ready to go use the [the command-line
Expand Down
3 changes: 1 addition & 2 deletions pkg/connector/inet/inet.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ func (e *HttpError) Temporary() bool {
return e.Code == http.StatusServiceUnavailable ||
e.Code == http.StatusGatewayTimeout ||
e.Code == http.StatusRequestTimeout ||
e.Code == http.StatusMisdirectedRequest ||
e.Code == http.StatusTooManyRequests
e.Code == http.StatusMisdirectedRequest
}

func SendFleetAPICommand(ctx context.Context, client *http.Client, userAgent, authHeader string, url string, command interface{}) ([]byte, error) {
Expand Down
Loading