We shouldn't call them mistakes if they're sins.
We should flee temptation whenever possible. God never tempts us.
(1 Corinthians 10:13 NIV) No temptation has seized you except what is common to man. And God is faithful; he will not let you be tempted beyond what you can bear. But when you are tempted, he will also provide a way out so that you can stand up under it.
(James 1:13-14 NIV) When tempted, no one should say, "God is tempting me." For God cannot be tempted by evil, nor does he tempt anyone; {14} but each one is tempted when, by his own evil desire, he is dragged away and enticed.
Thanks for your comment