I'm trying to get advice on how to make my challenges better. One rule that I feel like I'm always specifying is what to do when an invalid input is given. There's really two main paradigms to take here. Either
No invalid inputs will be given. Invalid input results in undefined behavior. or
Inputs might be valid, and might be invalid. If they are invalid, you must clearly output that the input was invalid, e.g. by printing an error message, or a falsy value, or some other method.
Now obviously, this won't result in any hard-fast rules about challenge-writing, but I'd like to get your opinions. Is a challenge more interesting/better written if it uses the first method or the second?