Add spec for non-JSON errors containing the response body

Turns out the code is already there for handling them correctly. Can we merge this and get it onto master? @petehamilton can you add me to the RubyGems permissions?