diff --git a/src/Components/Components/src/NavigationException.cs b/src/Components/Components/src/NavigationException.cs index c30bf3b59e1c..f2b1af918551 100644 --- a/src/Components/Components/src/NavigationException.cs +++ b/src/Components/Components/src/NavigationException.cs @@ -8,10 +8,16 @@ namespace Microsoft.AspNetCore.Components; /// public class NavigationException : Exception { + + private const string RedirectExceptionMessage = + "A navigation was initiated during static rendering. " + + "This exception is not an error, but instead signals to the framework that a redirect should occur. " + + "It should not be caught by application code."; + /// /// Initializes a new instance. /// - public NavigationException(string uri) + public NavigationException(string uri) : base(RedirectExceptionMessage) { Location = uri; }