There are only two reasons to show an error message: 1. The customer has entered something that the system can’t accept, so the customer can’t continue (for example, a mismatching username and password). This kind of message should clearly and succinctly tell the customer what happened, how to fix it, and then move on.
2. Something very, very bad has happened to the system, so the customer can’t continue (e.g., an essential server just got smote by lightning). This kind of message should be very apologetic and should give the customer some alternate way of contacting you.