diff --git a/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesExtensions.cs b/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesExtensions.cs
index b6d760efcdd4..be1fbc332a34 100644
--- a/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesExtensions.cs
+++ b/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesExtensions.cs
@@ -20,6 +20,9 @@ public static class StatusCodePagesExtensions
///
/// Adds a StatusCodePages middleware with the given options that checks for responses with status codes
/// between 400 and 599 that do not have a body.
+ /// If uses its default value, it attempts to generate a
+ /// response using
+ /// and falls back to a plain text response that includes the status code.
///
///
///
@@ -33,8 +36,11 @@ public static IApplicationBuilder UseStatusCodePages(this IApplicationBuilder ap
}
///
- /// Adds a StatusCodePages middleware with a default response handler that checks for responses with status codes
- /// between 400 and 599 that do not have a body.
+ /// Adds a with the default response handler.
+ /// The middleware checks for responses with status codes between 400 and 599 that do not have a body and,
+ /// when an is available, attempts to generate a
+ /// response. If the service is unavailable or cannot write the response,
+ /// it generates a plain text response that includes the status code.
///
///
///
diff --git a/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesOptions.cs b/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesOptions.cs
index 9e91cbdef915..0256e454d51e 100644
--- a/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesOptions.cs
+++ b/src/Middleware/Diagnostics/src/StatusCodePage/StatusCodePagesOptions.cs
@@ -15,8 +15,10 @@ namespace Microsoft.AspNetCore.Builder;
public class StatusCodePagesOptions
{
///
- /// Creates a default which produces a plaintext response
- /// containing the status code and the reason phrase.
+ /// Creates a default whose handler attempts to generate a
+ /// response using , and falls back
+ /// to a plaintext response containing the status code and reason phrase when that service is unavailable
+ /// or cannot write a response.
///
public StatusCodePagesOptions()
{
@@ -52,7 +54,10 @@ private static string BuildResponseBody(int httpStatusCode)
}
///
- /// The handler that generates the response body for the given . By default this produces a plain text response that includes the status code.
+ /// The handler that generates the response body for the given .
+ /// By default this attempts to generate a response
+ /// using and falls back to a plain text response that includes the
+ /// status code.
///
public Func HandleAsync { get; set; }