Check HTTP status code before trying to parse response bodies, raise if not 2xx