when response body isn't JSON, include it in exception message