Skip to content

Commit d2550fc

Browse files
Potential fix for pull request finding 'Generic catch clause'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 8dce002 commit d2550fc

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

EssentialCSharp.Web/Program.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,17 @@ await McpJsonRpcResponseWriter.WriteErrorAsync(
587587
SitemapXmlHelpers.EnsureSitemapHealthy(siteMappingService.SiteMappings.ToList());
588588
LogSitemapValidationSucceeded(logger);
589589
}
590-
catch (Exception ex)
590+
catch (InvalidOperationException ex)
591+
{
592+
LogSitemapValidationFailed(logger, ex);
593+
// Continue startup even if sitemap validation fails
594+
}
595+
catch (ArgumentException ex)
596+
{
597+
LogSitemapValidationFailed(logger, ex);
598+
// Continue startup even if sitemap validation fails
599+
}
600+
catch (FormatException ex)
591601
{
592602
LogSitemapValidationFailed(logger, ex);
593603
// Continue startup even if sitemap validation fails

0 commit comments

Comments
 (0)