If you never want to fail then simply do nothing or copy what someone else has done. If you really want to learn, then try something that has not been done. Accepting that you sometimes will fail is the price of doing something worth doing.
“Seagulls, as you know, never falter, never stall. To stall in the air is for them disgrace and it is dishonor. But Jonathan Livingston Seagull, unashamed, stretching his wings again in that trembling hard curve–slowing, slowing, and stalling once more–was no ordinary bird.” — Richard Bach, Jonathan Livingston Seagull