-
Notifications
You must be signed in to change notification settings - Fork 10.3k
NavigationException doesn't have a useful message. #51787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@blowdart what is our policy for what can go into exception messages out of aspnet ? We disable display by default, of course. But these may go into logs. If we don't want the URL in the message, is it OK in the ToString()? (after all, it's in a property on the exception object) |
@danmoseley you are only probably seeing that because you have first chance exceptions turned on. The exception gets internally caught by the framework and handled. Is that not the case in your situation? |
I'm in conversations with other teams internally about logs and error messages, which may drive some requirements for 9 |
I'm following up with the Debugger team to see how we can ignore certain types of exceptions to avoid confusion here. |
Could well be. If it's always caught then it doesn't matter much. But first chance do still get logged in the debugger output - why not override Message. It's possible you could ask the VS debugger team to buy default not catch this first chance. They seem to do this for certain exception types out of the box. (I'm assuming you can't avoid throw/catch here due to architecture) |
Thanks for contacting us. We're moving this issue to the |
After some further discussion in the team we're moving forward with the following:
|
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Looks like this issue has been identified as a candidate for community contribution. If you're considering sending a PR for this issue, look for the |
Could I possibly pick this issue up seeing that the open PR is currently not active |
Uh oh!
There was an error while loading. Please reload this page.
this
aspnetcore/src/Components/Server/src/Circuits/RemoteNavigationManager.cs
Line 91 in d8a3aa8
creates an exception like this

with the URL in the Location field.
Ideally it should have a useful message that includes the URI, eg., "Could not navigate to https://localhost:7298/item/99"
the problem is that NavigationException is not overriding Message and ToString
aspnetcore/src/Components/Components/src/NavigationException.cs
Line 9 in d8a3aa8
If we want to keep the URL out of the message for security reasons, it should at least have a message like "Could not navigate to the URL".
The text was updated successfully, but these errors were encountered: