Very useful information on errors from The Musician's Way: A Guide to Practice, Performance, and Wellness by Gerald Klickstein.
1. Errors are not failures.
2. Errors are not shameful.
3. Errors are information.
Information- this is objective stance that a musician needs to cultivate so that errors do not undermine one's creativity and ability to perform. I am still working on this.