Traps are puzzles. Even if they didn't roll high enough, you should still describe enough about their environment that they could reasonably deduce that a trap was there.
https://theangrygm.com/traps-suck/
(I don't always agree with everything this guy says - especially when he strays away from the topic of games - but he's absolutely right about traps.)
Hot take: jails are evil, so someone good would be more interested in rehabilitation