Show more error details when connecting to the DB

For example if the error is not related to connection, show what is the error