chore: fix logical order
Some checks failed
Some checks failed
This commit is contained in:
parent
422433f5b4
commit
88b4ac8ac7
1 changed files with 2 additions and 2 deletions
|
|
@ -25,8 +25,8 @@ func addInstance(subject string, identity *Identity) {
|
|||
// apiError converts HTTP 408 error to ErrTimeout
|
||||
func apiError(err error) error {
|
||||
if err != nil && (errors.Is(err, inet.ErrVehicleNotAwake) ||
|
||||
strings.HasSuffix(err.Error(), "408 Request Timeout") || strings.HasSuffix(err.Error(), "408 (Request Timeout)")) ||
|
||||
strings.HasSuffix(err.Error(), "vehicle is offline or asleep") {
|
||||
strings.HasSuffix(err.Error(), "408 Request Timeout") || strings.HasSuffix(err.Error(), "408 (Request Timeout)") ||
|
||||
strings.HasSuffix(err.Error(), "vehicle is offline or asleep")) {
|
||||
err = api.ErrAsleep
|
||||
}
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue