Report HTTP error if possible on CLI commands.

Separated the reading of the HTTP response from the JSON parsing and on error, repor the HTTP response body as it may be useful to see the raw response when the API call fails.
For example, if the host is unreachable.
1 file changed
tree: f9c8d0e95c6d905fbb57d344447e100c9b1d8abc
  1. tools/