Don’t harp on the mistakes that your spouse made. (You also want to be cut some slack from time to time.) Saying words like “What were you thinking?” focus mostly on the mistake – made in the past.
Many times, you’d do best by just letting the mistake go unmentioned.
If you feel it ought to be mentioned so that it doesn’t happen again, then word it in the future, “What will you do differently next time?”