That depends on the GM.
Also the edition. Two of the above spells don't exist in 5e, for example. It's also possible that the casters didn't prepare the "right" spell, which is entirely unfair of the GM to think, because the character only has so many spell slots and they can't prepare everything they might need.
I think you're missing the point here, or looking at it too narrowly. The point is, part of the adventure is gatekeeped (gatekept?) behind a die roll. It could be a door, but it could be anything else. A wall that the party fails to climb, a chasm they can't cross, a puzzle they can't solve, anything like that. Failure here stops the players from progressing and ends up being a boring waste of time.
If the party can't get through the door, then what has happened? Have they expended resources? Is it likely that they'll be found out or their quarry has escaped in the time they took? If the only thing that happens is that the players have wasted their time, then the entire encounter was a waste of time. Nothing was accomplished and nothing interesting happened on the failure, other than the party can't continue.