Skip to content

Commit

Permalink
fix(REST): Return possible error on JSON parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
vaerh committed Nov 13, 2023
1 parent b4d5d8f commit 7134eac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions routeros/mikrotik_client_rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ func (c *RestClient) SendRequest(method crudMethod, url *URL, item MikrotikItem,
if err = json.Unmarshal(EscapeChars(body), &result); err != nil {
return fmt.Errorf("json.Unmarshal(response body): %v", err)
}
} else {
return err
}
}
}
Expand Down

0 comments on commit 7134eac

Please sign in to comment.