There's some information that can go out as part of a production error message that isn't harmful for end users. For example, it's OK to say that you're having a problem connecting to your database. However, you don't want to reveal more information than is necessary in any error messages that may go out to end users. You don't want to disclose the IP address of your database and certainly not the username that was attempted when you tried to connect. Both of those could aid a potential attacker in breaking into the database when it comes back online.
Since this ...