add early return to connection error