title: GET net::ERR_FAILED error when probing for extension
body: <p>There is a certain Chrome extension and I want to get a PNG file from it by <code>XMLHttpRequest</code>. If the extension is enabled, I want to write 'load' to the console, and if the extension is disabled, I want to write 'error' to the console.</p>
  
  <p>It works fine, but if the Extension is disabled, Chrome writes an error in the console that I do not want to appear:</p>
  
  <p><a href="https://i.stack.imgur.com/W3Ki8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/W3Ki8.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/FaMbF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FaMbF.png" alt="enter image description here"></a></p>
  
  <p>How can I remove this error from the console?</p>
  
  <p>(I have tried <code>window.onerror</code> but it doesn't work)</p>
  
  <p>The code:</p>
  
  <pre><code>var loadHref = function(href) {
      var xmlhttp = new XMLHttpRequest();
      xmlhttp.onload = function(){console.log('load')};
      xmlhttp.onerror = function() {console.log('error');};
      xmlhttp.open('GET', href);
      xmlhttp.send();
  }
  loadHref('chrome-extension://77672b238520494cba8855547dd00ba8/img/icon24.png');
  </code></pre>