J.k. Rowling said this quote

Failure gave me an inner security that I had never attained by passing examinations. Failure taught me things about myself that I could have learned no other way. I discovered that I had a strong will, and more discipline than I had suspected; I also found out that I had friends whose value was truly above the price of rubies.