Skip to content

Commit

Permalink
Removed temp print statements for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
itsMeDavidV committed Dec 9, 2023
1 parent 986959f commit 329c442
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/connector/inet/inet.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,15 @@ func SendFleetAPICommand(ctx context.Context, client *http.Client, userAgent, au
}

log.Debug("Server returned %d: %s: %s", result.StatusCode, http.StatusText(result.StatusCode), body)
fmt.Println("\nresult.StatusCode = ", result.StatusCode)

switch result.StatusCode {
case http.StatusOK:
return body, nil
case http.StatusUnprocessableEntity: // HTTP: 422 on commands endpoint means protocol is not supported (fallback to regular commands)
return nil, protocol.ErrProtocolNotSupported
case http.StatusServiceUnavailable:
fmt.Println("case http.StatusServiceUnavailable")
return nil, ErrVehicleServiceStatusUnavailable
case http.StatusRequestTimeout:
fmt.Println("case http.StatusRequestTimeout")
if bytes.Contains(body, []byte("vehicle is offline")) {
return nil, ErrVehicleNotAwake
}
Expand Down

0 comments on commit 329c442

Please sign in to comment.