Add basic connection error handling