error return in func Connect