Sharon Salzberg said this quote

When we don’t allow setbacks to defeat us, they become opportunities for learning, acceptance, flexibility, and patience.