Skip to content

Commit

Permalink
Warp: fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Apr 28, 2024
1 parent 26973a0 commit 07e7ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charger/warp2.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ func (wb *Warp2) meterValues() ([]float64, error) {
err := wb.meterDetailsG(&res)

if err == nil && len(res) <= 5 {
return nil, errors.New("invalid length")
err = errors.New("invalid length")
}

return res, nil
return res, err
}

// currents implements the api.MeterCurrrents interface
Expand Down

0 comments on commit 07e7ded

Please sign in to comment.