Skip to content

Commit 653055f

Browse files
refactor: narrow sitemap catch clause to InvalidOperationException
EnsureSitemapHealthy only throws InvalidOperationException; using a generic catch was overly broad. Addresses GitHub code quality feedback.
1 parent fa37d5f commit 653055f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

EssentialCSharp.Web/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ await McpJsonRpcResponseWriter.WriteErrorAsync(
609609
SitemapXmlHelpers.EnsureSitemapHealthy(siteMappingService.SiteMappings.ToList());
610610
LogSitemapValidationSucceeded(logger);
611611
}
612-
catch (Exception ex)
612+
catch (InvalidOperationException ex)
613613
{
614614
LogSitemapValidationFailed(logger, ex);
615615
// Continue startup even if sitemap validation fails

0 commit comments

Comments
 (0)