I removed the @rendermode from the \<Routes /\> at the App.razor page in-order to access the HttpContext at the Login Component. This is to create a cookie for the Authentication purpose. Now, since the MainLayout.razor is not interactive, I'm unable to use \<ErrorBoundary\> globally. Even I wrapped the @Body with \<ErrorBoundary\>, the error messages are not rendering on the UI.
As described in the Microsoft Document here, I tried adding <ErrorBoundary> to an individual component which contains @rendermode @(new InteractiveServerRenderMode(prerender:false)), but seems it does not work either.
Any help would be highly appreciated! Thank you in advance.