Remove duplication when raising record not found