Skip to content

NavigationException doesn't have a useful message. #51787

@danmoseley

Description

@danmoseley

this

throw new NavigationException(absoluteUriString);

creates an exception like this
image
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

public class NavigationException : Exception

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-navigationhelp wantedUp for grabs. We would accept a PR to help resolve this issue

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions