Pretty much. Attach some kind of risk to making the check, or just let it succeed. If it's impossible to succeed, just say so and don't bother with the dice. Any time failure (or even success, for that matter) just leads to, "Nothing happens," the result is an increase in boredom at the table. If there's no risk attached to the test and no time constraints, the players can just sit around and chatter about different ways to tackle the problem until they succeed. While this may be fun for some people, in my experience it bores me to tears. I suppose the case could be made that a locked chest (for example) could yield some resource that might be useful later, but if a failed check only means they don't get it, then the only person that's fun for is the DM, who knows what's in the chest.
I see where you're coming from, but from my perspective "nothing happens" often as not translates to "the results are not yet obvious." The failed "open the chest" roll for example, might govern
when the PC gets the item in the chest (if he gets it now, it might be stolen by the thief hiding in the next room, if he gets it later, the thief may later be dead.) Or how he gets the item (lock doesn't open; the PC breaks the chest, and gets the item but it's partially damaged by the breaking). Or if someone else gets the item (the PC can't open the lock, but later a thief following the party sees the chest and gets the item, which he can use against the PCs, etc.) You never know, since, at least as I play, the action develops a little bit at a time and it can be hard to tell when the butterfly wings now cause the hurricane later.
Now, don't take this to mean that I am in favor of trying to stop or hamstring the players left and right. What I am saying has more to do with success/failure of a given task is often neutral or a matter of opinion as to whether it is a success or failure for the player, and on what time scale. Player unlocks the door, fights the werewolf on the other side, is killed. Player fails to unlock the door, takes another way, finds the Wolf's Bane sword along the way, trounces the werewolf. Games have a way of surprising you, especially when as DM you don't think about situations in terms of the right and wrong outcome.