So I made a planned dungeon for a mostly improv game we're playing. I set the final boss in the storage room, it connected to the office room (one of the first rooms) through a sturdy metal door that couldn't be opened. Both for lore reasons, and to signal players that probably something important was meant to be there (and showcase the metal door prop I just painted) But I never intended the door to be opened. The itinerary I planned was necessary for the story to work, since I wanted the PCs to visit the other rooms and gather relevant info, not just finding and killing the boss.
A player reached the door and rolled to try and lockpick it. I'm not sure if I allowed it or the player just rolled dice after declaring their action, but in my head I wanted the players to try a few times until they get some high numbers (15 to 19) and then it's clear that the door won't budge. Like "well, we tried everything, this door cannot be opened".
Instead, player rolled a nat20 first try. Since the game was improv until now, a low-key agreement that all nat20s are success with a bonus was implied. But this time I had plans for the dungeon to work in a different way, the door shouldn't be opened.
So after the 20 I gave player all kind of information about the door and told them if they saw the key, they could recognize it instantly by its size. I think that made them feel smart and this pushed them to go explore the rest of the dungeon. Player still claimed they should get "something" with that 20 and suggested a peek through the keyhole or the spacing between door and frame. I agreed and set the walls and part of the scenery in the room, including the rubble and the ravaged crates. I didn't reveal the boss yet, but hinted the presence of something destructive in there.
The rest of the game went on as planned, players never found a key because I forgot to include it, but everyone was happy in the end. We're not the kind of people who rules mistakes into each other's faces.
Still, I think I could have done better, I didn't allow the player to succeed with a nat20, yet I'd probably punish them with a nat1 which, in retrospective, is a little douchebag behavior. I even offered a way to "success with a requirement", the key. Then never provided such key.
So what could I've done instead? How do you deal with a situation that cannot be solved with a roll, but the players still need to try the action/survey the element before realizing it cannot be solved?
And what if the characters roll high and you cannot provide access to what they're trying? Is the trade off for a little extra information enough? Is the revelation of an alt way or additional requirement (finding the key in my case) enough? (provided I grant them the key, of course).
Should I just let them through, face the boss in the second room, explore the rest of the dungeon later?