In 2 Samuel 12:1-13, the prophet Nathan comes before King David with a story of a rich man who took the only ewe lamb of a poor man. This angers King David and he demands that man repay 4 lambs for the one.
When then told he was the rich man, King David repents of his sin with Bathsheba.
Anything birthed out of sin, God will not bless nor will He advance it. We must deal with any sin or transgression before entering God’s throne room.