Handle rest client 500 response if non-json body

* Rest client should gracefully handle 500 response from api
  with non-json body.
* Use response body as is in case of above issue.

Change-Id: I1adf2e0af0abead0767d628142a18916154ada79
Closes-Bug: #950449
Merge "Handle rest client 500 response if non-json body"