title: Return success when handling error in a promise
body: <p>I have a promise that handles a HTTP request performed over a Web API:</p>
  
  <pre><code>promise = promise.then(r =&gt; { 
      // ...
    }, error =&gt; {
      if (error.status == 404) {
        // Here I can fix an error and continue properly
      } else {
        // Here the error should be propagated further in the promise
      }
  }
  
  // later in the code:
  promise.catch(r =&gt; { /* More error handling */ } );
  </code></pre>
  
  <p>Later in the code this promise is chained to more error checks. </p>
  
  <p>In case of a 404 error, I can actually "fix" a problem, and I don't want the other handler to trigger. I'd rather want to make the promise a success in this case. How can I do that?</p>
  
  <hr>
  
  <p>A bit more code to explain my case more deeply:</p>
  
  <pre><code>refresh() {
    this.refreshAsync().catch(r =&gt; {
       // Show error to the user.
       notifications.showError("Unexpected error happened");
    });
  }
  
  async refreshAsync() {
    // Here goes a lot of vue-resource calls to gather the necessary data for a view. They are chained with `await`. Only one of them:
    await this.$http.get(url).then(r =&gt; {
      this.data = r.data;
    }, error =&gt; {
      // 404 is actually a legit response for API to return, so the user notification above should not be shown
      if (error.status == 404) {
        // handle successfully
      } else {
        // propagate an error, so the handler above could show a warning to the user.
      }
  
    });
  
  }
  </code></pre>