diff --git a/aspnetcore/fundamentals/error-handling.md b/aspnetcore/fundamentals/error-handling.md index 200a5aaf8e..0889eeb45f 100644 --- a/aspnetcore/fundamentals/error-handling.md +++ b/aspnetcore/fundamentals/error-handling.md @@ -161,7 +161,9 @@ The endpoint that processes the error can get the original URL that generated th ## Disable status code pages -Status code pages can be disabled for specific requests in a Razor Pages handler method or in an MVC controller. To disable status code pages, use the : +To disable status code pages for an MVC controller or action method, use the [[SkipStatusCodePages]](xref:Microsoft.AspNetCore.Mvc.SkipStatusCodePagesAttribute) attribute. + +To disable status code pages for specific requests in a Razor Pages handler method or in an MVC controller, use : ```csharp var statusCodePagesFeature = HttpContext.Features.Get();