@Michael Lambert I wasn't able to replicate your issue. WeatherForecast isn't an accessible route on the default Blazor template.
The error message for the invalid route is handled on the App.razor file which is what you should've gotten. Verify your App.razor and also check for any modified @Anonymous directives.