chore: minor
This commit is contained in:
parent
1d5cdca813
commit
c96769981c
1 changed files with 2 additions and 4 deletions
|
|
@ -93,13 +93,11 @@ func (c *OpenEVSE) setOverride() error {
|
|||
uri := fmt.Sprintf("%s/override", c.uri)
|
||||
|
||||
if err := c.GetJSON(uri, &data); err != nil {
|
||||
if se, ok := errors.AsType[*request.StatusError](err); ok && se.HasStatus(404) {
|
||||
goto IGNORE
|
||||
if se, ok := errors.AsType[*request.StatusError](err); !ok || !se.HasStatus(404) {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
IGNORE:
|
||||
state := openevse.Disabled
|
||||
if c.enabled {
|
||||
state = openevse.Enabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue