title: ErrorBoundary as global exception handler?
body: <p>From the documentation and design documents, it looks as if I cannot use <code>ErrorBoundary</code> to catch unhandled exceptions and to show an error page to the user:</p>
  <p><a href="https://docs.microsoft.com/en-us/aspnet/core/blazor/fundamentals/handle-errors?view=aspnetcore-6.0#error-boundaries" rel="nofollow noreferrer">Documentation on <code>ErrorBoundary</code></a>:</p>
  <blockquote>
  <p>We recommend narrowly scoping error boundaries in most scenarios.</p>
  </blockquote>
  <p><a href="https://github.com/dotnet/aspnetcore/issues/30940" rel="nofollow noreferrer">Design proposal for <code>ErrorBoundary</code></a>:</p>
  <blockquote>
  <p>Non-goals:</p>
  <ul>
  <li>Changing what it means to do global exception handling. We already have ILogger for logging, and beyond that, truly unhandled exceptions mean the app is in an undefined state which is unsafe to continue.</li>
  </ul>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>Error boundaries are not expected to catch all possible exceptions. We're trying to cover ~90% of the most common scenarios, (...)</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>Developers might think that all possible exceptions will be caught and become recoverable. This doesn't put server stability at risk, but just means the developer will be surprised when the terminal error UI still can appear.</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>Developers might think they don't need to customize terminal error UI any more. It may be confusing that there are multiple different error UIs to customize (one per error boundary, and a final terminal one).</p>
  </blockquote>
  <p>So, why shouldn't I use <code>ErrorBoundary</code> for this? I agree that recovering from an unhandled exception might not be desirable; but what if I don't allow recovery from this global <code>ErrorBoundary</code>?</p>
  <p>If I shouldn't use <code>ErrorBoundary</code>, what should I use to show an error page to the user? Currently the UI just freezes and a message is shown in the Developer Console of the browser. The design proposal talks about &quot;terminal error UI&quot;, but I find no reference to this in the documentation.</p>
  <p>And if <code>ErrorBoundary</code> is the way to go; how do I cover the remaining ~10% to show an error message to the user when their circuit has fried?</p>