add error handling machenism when the queried data do not exist in the database