Let’s say spells are needed to perform magic. The spells would harness magical energy, but if the spell is performed wrong, we have two options: nothing happens, or magic still happens but in unintended ways. Both are plausible. Failure can mean that the energy wasn’t harnessed at all, which seems the safest poor result. Failure can also mean the energy was harnessed but discharged improperly, resulting in an alternate outcome, whether that’s a deadly explosion or a minor variation in the intended result. It’s up to us to decide which we want.
Comic results are sometimes desired, particularly in children’s books like Harry Potter. But we can also show the dangers of magic with perilous failure. Imagine how few people would want to do this if it’s so dangerous. By contrast, if nothing happens, an attempt is less fraught with worry. We might badly need the spell to succeed and feel pressure for that reason, but if we can’t do it right, we and others aren’t dead or worse. Decide how dangerous magic should be in the setting. It’s easy to imagine wizards who are a nervous wreck when doing something powerful if disaster could result. This can also cause strong restrictions by governments and others. It also ramps up the apprehension people feel when someone tries a spell. If you’re a wizard and about to do something, I might run for my life even if you’re my friend and I trust you. All of this can be significant reason for training facilities. But if nothing happens when failure occurs, everyone would be far more casual about it. What do they have to lose?
We can also invent solutions per situation or spell type (or even magic type). What if I’m a spell author and I know how to make my spell recipes safely dissipate energy when done wrong? But another guy had no idea and his spells are therefore more dangerous? My spell recipes are more desired. Why would anyone use the other guy’s spells? Because those are the only ones they’ve found.
Breaking a spell down into parts helps with this. Maybe the energy must be harnessed first, then manipulated before being expended. Can a wizard sense the harnessing? If so and it’s not working, he might stop right there. This failure will not expel energy and therefore nothing will happen. But if the energy is harnessed, and then the expulsion part of the spell is where failure occurs, an accidental result seems more plausible. For this reason, maybe some wizards craft their spells in reverse: the part to control the energy comes first, followed by the gathering of energy. This way, if failure happens during the first part, the harnessing also fails and nothing happens. Regardless of the order, some spell authors might’ve put in a failsafe that causes energy to be quietly released back to where it came from or safely dispersed elsewhere.
It seems plausible that all of these options would exist in the same world. We can have individual spell creators with a reputation for one thing or another. There can be entire schools of magic that only teach one kind of spell, whereas rogue wizards are willing to do the more dangerous spells. Perhaps the latter are only created by rogue authors trying to achieve an end result that sanctioned places, like a school of wizardry, forbid. Or maybe truly powerful spells require so much of the wizard’s energy to perform that some spell authors dispensed with the safeguards because it made the spell that much more taxing or complicated. Short cuts happen in all parts of life, even when unwise.