e&gt; GetAsync(string? requestUri)
    {
        var response = new HttpResponseMessage();

        try
        {
            response = await _httpClient.GetAsync(requestUri);
        }
        catch (Exception ex)
        {
            _exceptionRecorderService.Exceptions.Add(ex);
        }

        return response;
    }
}</pre>
<p>To use this technique in your application, register both classes in your <strong>Program.cs</strong> file using the <code>AddScoped</code> and <code>AddHttpClient</code> metho