api call error forwarding to cli

* prints api call error along with http error
* checks for empty error response body

Closes-bug: #1259585

Change-Id: I332fa960d74681610e6cf6b759c9b6bd5f91ec91
Merge "api call error forwarding to cli"