raise error if record is not found