ds.</p>
<pre class="code" language="csharp">builder.Services.AddScoped&lt;ExceptionRecorderService&gt;();
builder.Services.AddHttpClient&lt;BlazorSchoolHttpClientWrapper&gt;();</pre>
<p>Once you've registered the classes, you can inject the <code>BlazorSchoolHttpClientWrapper</code> and <code>ExceptionRecorderService</code> into any component and use them to catch and handle API errors.</p>
<pre class="code" language="razor">@inject ExceptionRecorderService ExceptionRecorderService
@inject BlazorSchoolHttpC