As Jacob slept he had a dream that a ladder was set on earth, and it reached up to heaven; and the angels of God were ascending and descending on it. God said, "The land on which you lie I will give to you and your descendants, and your descendants shall be as the dust of the earth." Jacob made a vow that the Lord will be his God.
Jacob became Israel. He certainly waned in his commitment to Yahweh. Just like us, he strayed at times in sin. Yet, God's lovingkindness remained on him and his descendants forever. Was there consequences to their sin? Surely, but His Yahweh and our Jehovah never breaks his covenant nor promises.