handle exception connection with bad data