error handling for sample entry