push subscription error not triggering catch
<p>I am trying to take a specific action if my push registration fails. To make the subscription fail, I have removed the <code>&lt;link&gt;</code> to the <code>manifest.json</code> file (I'm using Chrome). I get the following error as expected:</p>

<pre><code>Uncaught (in promise) DOMException: Registration failed - manifest empty or missing
</code></pre>

<p>However this error comes from <code>index.html:1</code> rather than <code>main.js</code>, where the subscription code lives:</p>

<pre class="lang-js prettyprint-override"><code>function subscribe() {
  navigator.serviceWorker.ready
  .then(function(reg) {
    reg.pushManager.getSubscription()
    .then(function(sub) {
      if (!sub) {
        reg.pushManager.subscribe({userVisibleOnly: true})
        .then(function(subscription) {
          console.log('Subscribed to push,', subscription);
        });
      } else {
        console.log('Already subscribed');
      }
    });
  })
  .catch(function(e) {
    console.log('catch!');
    // Do something
  });
}
</code></pre>

<p>And (I suspect as a result) the <code>catch</code> block is not triggering. Is this correct behavior or am I likely doing something wrong? </p>

<p>More details:
I am trying to simulate offline behavior, which is why I have removed the link to <code>manifest.json</code> (which would be unavailable offline unless cached). If the subscription fails because the app is offline, I'd like to take action in the <code>catch</code> (e.g. queue an analytics hit or update UI).</p>