Inflict half damage on a miss.
So an introductory word: on one level, you're fine. You presented something the players didn't expect, hopefully by actually saying something like "wait, this corridor wasn't supposed to be patrolled today" rather than just describing a patrolled corridor and trusting the players would look at their own notes and create their own surprise. As long as your players were worried while the dice were tumbling and relieved when they landed high, that little interlude has had its desired effect.
But, I get it. This was supposed to be the frostro bostro dragon, you had it all set up just that one clean hit from its bostro frostro breath would get somebody trapped in ice and things would get all dramatic, but you didn't roll high enough to hit ANYBODY, not even your clank-clank cleric. And when it got its breath weapon back again and raked everybody with it again, you somehow managed to skunk all the rolls AGAIN. It doesn't matter what kind of effort you put into describing the pulsing ice veins on its neck and the way the breath snaps and cracks in the air as it rushes past, the actual effect of the fight was just a big white dragon, not at all the experience you wanted.
You don't totally dodge a white dragon's breath, though, right? When it misses it does half damage. The type and amount of that damage (and, yes, the shape of the breath) is one important way in which a dragon of one color is different from another, and so dragon fights don't feel the same even if your players propitiate the unholy demons of DM dice jinxing. You need a "half damage" for this effect, too.
In the frostro bostro case it's, I dunno, on a miss portions of the ice cage still form all around you, creating difficult terrain in a close burst 1. Somebody can still burn a ground slam or fire wave to clear out a chunk of it and get everybody moving, and it pays off your description while still giving your players a sense they dodged something significant.
So what is it in the stealthily heistily case?
...as long as you have more than one hit point.
In the degenerate case, a stealth operation has exactly one stealth hit point. The party is either unseen and undetected, or everyone knows where they are and is closing in to capture them, with little practical room in between.
Whatever system you run a heist in, make sure it's not limited to the degenerate case, and instead offers something like a suspicion pool or a stealth clock or some sort of system-relevant way to create room between full alert and condition green. Even if the dice get you through a patrolled corridor without being seen, it's still quite a bit slower than just walking through the corridor and only having to worry about making enough noise to tip off people in adjoining rooms. And the longer you stay in...
The bank? I'ma call it the bank, you'll see why later.
The longer you stay in the bank, the more trace of yourself you can't help but leave. Lose one stealth hit point.
Or if you're in a system like Blades in the Dark where the GM can make up whatever clocks they want at any time, the time clock ticks forward or perhaps starts spinning if your scoundrels haven't previously encountered undue delay.
Of course there's the chance that you're already accounting for this, too, and the dice roll that got your PCs past the obstacle was so good they got some critical benefit out of it, such as not taking a bunch of extra time.
In the 4E case, where I'm assuming you're using some kind of skill challenge framework to set this up, your stealth hit points are your challenge failures, but the way the system is set up it doesn't make a sense to say "eat a failure even when you succeed". A simple way to pay this forward is to make whatever the next thing is in sequence one step harder, or with some kind of circumstance penalty, representing the extra effort you need to put in to make up for the lost time.
But in the broader analogy space, hit points can also be recovered and effects can be dispelled -- as long as something's possible as a result of the dice it can happen. So suppose this is one of those cases of extreme good luck and any "damage" you might have done, any clocks you might have ticked, have been preempted by the sheer flair of it all.
You can still have this leave an impact. How?
Everything happens for a reason.
That is, every effect has a cause. This corridor wasn't supposed to have anybody in it, and yet, it does. Why is that? If the cause extends beyond simply this room, then even if this room had no immediate mechanical drawback it still serves as foreshadowing for something the players might face in the future. When you call back to it later on, it will feel impactful and important even if the dice just slipped right by.
Maybe the corridor isn't supposed to have anybody in it today, because it was going to be cleaned. But Viscount Poncingjay threw a real rager last night and he's bought out every cleaning service he can find to get the place back in shape before Mumsy comes back from vacation. This could just be a fun conversation to overhear, or it could really throw a wrench in the players' plans if they were, say, planning to disguise themselves as cleaners and sneak out later.
Maybe the corridor isn't supposed to have anybody in it for the next fifteen minutes, because that's how patrols usually run. But somehow a cat got loose in the bank and it was kind of an all-hands scramble to get the darn thing corralled before it tripped some of the passive defenses and created a real hassle for security to stand down and some very bad PR. This could just be a fun conversation to overhear, or it could really throw a wrench in the players' plans if they were, say, planning to make use of precise patrol timing and now everything's been thrown off by some random time interval.
Or maybe there's a big twist you're planning from the start. The corridor isn't supposed to have anybody in it because it's a sparsely monitored overflow zone, but now it's full of a mix of regular bank personnel and security staff from the West Metropole embassy. The West Metropole ambassador got up today and decided to deposit something important into the bank, or maybe withdraw something important the bank currently has custody of. Now your players have an entirely different faction and general higher security to deal with, especially if the ambassador is trying to withdraw the same thing everybody's there to steal.
You should always understand the reason behind something when you put it into your game, even if it's as simple as a surprise guard patrol. When you understand why it's there, it makes it easier to understand the orthogonal consequences you might bring down on the PCs and the ways it might have further narrative impact down the line.