In my Blazor WebAseembly application there are a few HTTP interceptors (delegating handlers). The UnAuthorized interceptor checks the HTTP status code and if it's 401, the rest of the pipeline do not matter, and user needs to be redirected to the login page.
How can I achieve this in Blazor? Currently I get exception in other interceptors or the HTTP client, because they all execute. But I need to break the circuit somehow.

I used an http client interceptor in my app as follows:
First I installed "Toolbelt.Blazor.HttpClientInterceptor" nuget.
Then I created a new HttpInterceptorService.cs class:
When I want to use it in a razor page, I do as following:
When the user is not authorized on that page, it will automatically navigate to the specified location.
You can add more routes not only for authorization, simply customize the switch case in the
HttpInterceptorService.cs