Raise an error when couldn't find a record