Handle failed connection