update error handling sample