handle errors caused by varch