Failure is absolutely critical to our growth as individuals, in our personal development journey, and for our continued progressive living.
There is almost no way to growth but through failure. Perhaps, there is another better way to call it which is "feedback" which sound much more nurturing, but still, there is no other better way to grow. Of course, I'm not saying that we should all go out there to look for chances to fail to just grow.
What I'm saying is that failing is a critical part of success – here it is, if growth and innovation and development is the process of taking steps forwards, and these steps sometimes extends to where you cannot see what the possible conclusion will/can be, then it will be rational or reasonable to expect that you will fail and fall some parts of the process.
There is no such thing as failure, only feedback. I prefer to not call it failure, because that gives a negative vibe or tinge to it, that's why I prefer to call it as feedback. That gives me a motivation to take "failures" more as learning points where I garner data and experience, so I can do a better job at such challenges in the near future, as opposed to seeing them as absolutes where I label myself as "not so good in such and such" and hard wiring myself to believe that should I face the same situation/challenges/issues in the future, I'd likely have a hard time again.
The thing is, many people go into mistake-avoidance mode, because "they cannot get caught for making mistakes"…because the consequences are heavy when we make a mistake. I think that is incomplete and too presumptuous, because I'd rather work with a person who admits to a mistake and learns from it than someone who made a mistake and not own up to it, for reasons being (1) humility; (2) teachability; and (3) honesty, which really are characteristics of people who will succeed in life as a whole, even if the dishonest person has a PhD and the other doesn't, I'll still choose the one with integrity.
So, is failure okay? Absolutely. As long as you own up to it, learn from it, do a better job at it, and not repeat it. Then, I'll rather call it feedback or on-job-training.