There's no success without failure. There is no guarantee of success and we can only keep trying by improving what we do with the knowledge we get along the way.
Sometimes the spent weeks and months should just thrown away and the work should started from scratch with the gained experience and knowledge from that failure.
When there's a failure document a report which explains why there's a failure. This will help both for future successes and help to analyse the events better and deeper. Give people a chance to soft-fail, and do it safely by knowing there can be a failure to get to the success by the right track.
Don't you think we learn from failures and failures lead to success? Please share below.