You should make function and call it again when it fails. manager.on('sentOfferChanged', function(offer, oldState) { if(offer.state == 3) { handleNewItems(offer); } }); var handleNewItems = function(offer) { offer.getReceivedItems(function(err, items) { if(err) return handleNewItems(offer); // code }); }; Also, there could be a problem because cookies expires.