Handling database connect error.