In addition to Patrick's answer:
Time it takes to retry needs to be short, borderline instantaneous. Take Super Meat Boy as an example. Compare with Teslagrad's 4 second death animation.
Time it takes to regain your progress should also be relatively quick. This goes along with Patrick's comments regarding checkpoints. Taslagrad is pretty good here, as you Tappanrespawn at the entrance to the room you just entered and most rooms can take only seconds to completely transverse, no more than a minute at the high end.
No long term consequences beyond time lost. Don't penalize the player's exp or in-game currency. Such penalties lead to the player complaining about cheap deaths. For instance, in Teslagrad I found a particularly hard puzzle that kept repaving me facing towards the door I entered, and if I tried to start the puzzle without first turning around, I'd kill myself by miss-timing a jump+ability usage. Which cost me am additional 5 seconds as. I waited for the death animation to finish.
Put limits on the frequency, accuracy, and coordination skills required when building your puzzles or other chalangeschallenges. The tighter the accuracy or timing the worse off your game will be, as those players that have issues (be they handicapped or just less skilled) will grow frustrated and rage-quit. This is particularly important when it comes to boss fights. "Do the thing 3 times, 3 times" is the biggest complaint I've seen about Teslagrad. Everyone rapidly figures out what they need to do, but actually doing it often requires incredibly precise timing or movement. The act isn't even that hard, its pulling it off 9 times in a row without getting hit that's the problem.
- This is also why I hate Super Meat Boy myself. The slippy controls combined with the pixel-perfect jumping, frame-perfect timing is something I just can't do.