Add chain and correctly handle errors in http.getBody