Add test to check for connection error