* Improve error handling when response body is not JSON
