MIST-286 Handle error responses in the RPC Client.Do method
MIST-286 Handle error responses in the RPC Client.Do method

In most of the error cases, subagents will return an error HTTP status
code along with a string body message. Client.Do was expecting all
responses to be JSON and tripped when trying to decode the non-JSON
error string. That replaced the real error with a JSON decoding error,
losing the original message.

Instead, read out the body message and make it into an Error when the
HTTP status is in the error range (>= 400)

mistifyio/mistify-agent,mistifyio/mistify-agent