title: How to properly catch exceptions from C#'s HttpClient getAsync so the error says more than "One or more errors occurred"?
body: <p>The following is some code that downloads a file using <code>System.Net.Http.HttpClient</code></p>
  
  <pre><code>try
  {
      var responseResult = new System.Net.Http.HttpClient().GetAsync(fileUrl);
      using (var memStream = responseResult.Result.Content.ReadAsStreamAsync().Result)
      {
          using (var fileStream = File.Create(saveToPath))
          {
              memStream.CopyTo(fileStream);
          }
  
      }
  }
  catch (Exception e)
  {
      Console.WriteLine(e.StackTrace);
  }
  </code></pre>
  
  <p>Sometimes I call this and a file fails to download. In that situation, the catch is called but doesn't contain any information of the issue:</p>
  
  <pre><code>One or more errors occurred.
      at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
      at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
      at System.Threading.Tasks.Task`1.get_Result()
      at SpPrefetchIndexBuilder.FileDownloader.StartDownloads(Int32 timeout)
  </code></pre>
  
  <p>How can I get it to the cause of this exception?</p>