<h4 dir="auto">Describe the bug</h4>
<p dir="auto">The optional field <a href="https://github.com/axios/axios/blob/v1.x/index.d.ts#L276">"response"</a> of the class AxiosError&lt;T, D&gt; has the type AxiosResponse&lt;T, D&gt;.  But I found it to be an XMLHttpRequest when running into a cors error. The same XMLHttpRequest is also set on the "request" field. I tried to find the code where this error is thrown but was not able to yet.</p>
<h4 dir="auto">To Reproduce</h4>
<p dir="auto">Try triggering a cors error.</p>
<h4 dir="auto">Expected behavior</h4>
<p dir="auto">Only the "request" field should be set with the XMLHttpRequest, the value of the "response" field should be undefined.</p>
<h4 dir="auto">Environment</h4>
<ul dir="auto">
<li>Axios Version 0.27.2</li>
<li>Adapter XHR</li>
<li>Browser Chrome</li>
<li>Browser Version 104</li>
</ul>
<h4 dir="auto">Additional context/Screenshots</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/25606653/185555205-a08e11bc-22ed-4a95-a3fe-fae5dfd79bae.png"><img src="https://user-images.githubusercontent.com/25606653/185555205-a08e11bc-22ed-4a95-a3fe-fae5dfd79bae.png" alt="image" style="max-width: 100%;"></a></p>
<h4 dir="auto">Describe the bug</h4>
<p dir="auto">When performing an axios request which is rejected with <code class="notranslate">ERR_NETWORK</code> the created <code class="notranslate">AxiosError</code> contains the request as response.<br>
This leads to the issue that the response of the <code class="notranslate">AxiosError</code> contains the status code 200 and the body of the request although in reality no response was received.</p>
<p dir="auto">I think the issue is that the request is passed as 5th parameter (response) of the <code class="notranslate">AxiosError</code> constructor here:<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/axios/axios/blob/bc733fec78326609e751187c9d453cee9bf1993a/lib/adapters/xhr.js#L119">axios/lib/adapters/xhr.js</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 119
      in
      <a data-pjax="true" class="commit-tease-sha" href="/axios/axios/commit/bc733fec78326609e751187c9d453cee9bf1993a">bc733fe</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L119" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="119"></td>
          <td id="LC119" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">reject</span><span class="pl-kos">(</span><span class="pl-k">new</span> <span class="pl-v">AxiosError</span><span class="pl-kos">(</span><span class="pl-s">'Network Error'</span><span class="pl-kos">,</span> <span class="pl-v">AxiosError</span><span class="pl-kos">.</span><span class="pl-c1">ERR_NETWORK</span><span class="pl-kos">,</span> <span class="pl-s1">config</span><span class="pl-kos">,</span> <span class="pl-s1">request</span><span class="pl-kos">,</span> <span class="pl-s1">request</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<h4 dir="auto">To Reproduce</h4>
<p dir="auto">Sample project:<br>
<a href="https://github.com/axios/axios/files/8588127/sample.zip">sample.zip</a></p>
<p dir="auto">Running the sample project with <code class="notranslate">npm run test</code> prints the following to the console:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error code: ERR_NETWORK
response status: 200
response body: {&quot;foo&quot;:&quot;bar&quot;}"><pre class="notranslate"><code class="notranslate">error code: ERR_NETWORK
response status: 200
response body: {"foo":"bar"}
</code></pre></div>
<h4 dir="auto">Expected behavior</h4>
<p dir="auto">The response field in the <code class="notranslate">AxiosError</code> created due to <code class="notranslate">ERR_NETWORK</code> should be undefined.</p>
<h4 dir="auto">Environment</h4>
<ul dir="auto">
<li>Axios Version 0.27.2</li>
<li>Adapter XHR</li>
<li>Browser -</li>
<li>Browser Version -</li>
<li>Node.js Version 18.0.0</li>
<li>OS: macOS 12.3.1</li>
<li>Additional Library Versions msw: ^0.39.2</li>
</ul>
<h4 dir="auto">Additional context/Screenshots</h4>
<p dir="auto">NA</p>