Fix missing error message when database connection error occurred.