Audi: handle odometer errors
This commit is contained in:
parent
b1951dc014
commit
e0f68de753
4 changed files with 13 additions and 2 deletions
|
|
@ -51,6 +51,7 @@ func (r *Helper) GetBody(url string) ([]byte, error) {
|
|||
// decodeJSON reads HTTP response and decodes JSON body if error is nil
|
||||
func decodeJSON(resp *http.Response, res interface{}) error {
|
||||
if err := ResponseError(resp); err != nil {
|
||||
_ = json.NewDecoder(resp.Body).Decode(&res)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue