Making better Database Connection Error