add error handling sample