David continued to seek God, and God gave him another chance. God does give second chances.
Read: 1 Samuel 23:4
Once again David inquired of the Lord, and the Lord answered him, “Go down to Keilah, for I am going to give the Philistines into your hand.”