ception has been thrown by the target of an invocation."} System.Reflection.TargetInvocationException

I am scraping data from a website and when the scraper is running, it works fine for hundreds of records then all of a sudden i get the error message above, the project does not appear to be populated in this instance. However it is populated for the rest of the records up until then.

                public ProjectDetailsModel SaveProject(ProjectDetailsModel project, int organisationId, int researcherId, string languageCode = "en")
    {
        if (project.ScrapedSource == 0) throw new ScrapeSourceNotSetException();
        if (!string.IsNullOrWhiteSpace(project.ProjectThirdPartyIdentifier))
        {
            using (var db = new DatabaseConnectionFactory().Open())
            {
                var queryExistingProject = OrmLiteConfig.DialectProvider.ExpressionVisitor<ProjectDetailsModel>();
                var project1 = project;
                queryExistingProject.Where(
                    x =>
                        x.ProjectThirdPartyIdentifier.Trim() == project1.ProjectThirdPartyIdentifier.Trim() &&
                        x.ScrapedSource == project1.ScrapedSource &&
                        x.ProjectTitle.Trim() == project1.ProjectTitle.Trim() &&
                        project1.ProjectFunding == x.ProjectFunding)
                    .Limit(1);

                var existingProject = db.Select<ProjectDetailsModel>(queryExistingProject).FirstOrDefault();

                if (existingProject != null)
                {
                    LoggerService.Logger.Warn("Duplicate project avoided", new Exception(queryExistingProject.ToJson()));
                    return existingProject;
                }

            }
        }

        project.ScrapeSourceMigrated = true;
        project = ProjectCleanup(project, languageCode);
        if (!CheckFirstScrapedDate(project)) project.FirstScrapedDate = DateTime.UtcNow;
        if (!CheckLastScrapedDate(project)) project.LastScrapedDate = DateTime.UtcNow;

        var saved = _databaseService.Insert(project);
        if (saved.Id == 0) throw new DidNotSaveException("Saved id was 0");
        var scraperSourceDisplayName = project.ScrapedSource;
        Console.WriteLine($"Saving Scrape Source: {scraperSourceDisplayName}");

        IfResearcherEmailIsNullQueyeJobToFindIt(researcherId, organisationId, project.Id);

        LoggerService.Logger.Info(scraperSourceDisplayName + "Project Saved");
        LoggerService.Logger.Info(_appSettings.Get("Scraper:Name", Environment.MachineName) + "Project Saved");
        return saved;
    }