Parse error message body on non 200 HTTP status code

Error messages appear to be served as JSON, this commit adds parsing of them.

I would add tests, but I am having a hard time reading the format of the tests. These tests would create failure conditions i.e. searching for an entity which is not found, and assert a 404 is thrown, and the body is properly deserialized. 

Thanks for the useful library, saved me some time!