title: chrome extension detect ERR_PROXY_CONNECTION_FAILED
body: <p>I currently am developing a chrome extension that allows the user to set up a proxy, however my issue is if the proxy failed to load, chrome returns with <code>net::ERR_PROXY_CONNECTION_FAILED</code> in the console and a html page that says "Unable to connect to the proxy server". I have been in search of a way to detect this failure to connect so I can restore the connection either with a different proxy or just the normal ip without a proxy. The weird issue is my extensions code does not run on this page. </p>
  
  <p>Am I missing a specific "matches" in the  "content_scripts" in the manifest file thats special to error pages? (even though the url of the error page is the url for the page I am trying to visit and the extension code runs on if there is a working proxy/connection)</p>
  
  <p>Is there a way to catch this error? Any thoughts are greatly appreciated. Thanks in advance!</p>
  
  <p>Here is how I set up the proxy But as a reminder this code works, the issue is if you try connecting to a proxy server that isn't available, the browser just shuts down and my extensions code is not longer run with the page. </p>
  
  <pre><code>    var config = {
          mode: "fixed_servers",
          rules: {
              singleProxy: {
                  scheme: "http",
                  host: request.ip
              }
          }
      };
      chrome.proxy.settings.set({
          value: config,
          scope: 'regular'
      }, function() {});
  </code></pre>
  
  <p>My manifest code: (which runs as it should until the proxy fails)</p>
  
  <pre><code>"content_scripts": [ {
  "js": [ "jquery-1.11.1.min.js", "myscript.js" ],
  "matches": ["https://*/*","http://*/*","http://*/"],
  "run_at": "document_end"
  },
  </code></pre>
  
  <p>And a picture of the error page chrome returns when the proxy is not reachable:
  <img src="https://i.stack.imgur.com/EaBsc.png" alt="enter image description here"></p>