What’s better than a well crafted error message? The need for no error message at all. Well designed systems are crafted to prevent errors from happening in the first place.
Errors can usually be broken down into two types:
Slips can be avoided by providing useful constraints—like guardrails—and good defaults.
Mistakes can be reduced by using familiar design language (Speak the user's language) and recovered from by providing ways to undo (Give users control and freedom).