Catch tcp error