title: Promise error propagation
body: <p>I have this function which will if it fails retry, and if it fails x times it should finally reject the Promise. I have implemented this as follows:</p>
  
  <pre><code>examplefunction(retries = -1) {
      return new Promise(async (resolve, reject) =&gt; {
          try {
              const url = `example.org`;
              const json = await this._sendRequest(url);
              resolve(json);
          } catch (e) {
              if( retries &gt; 0 ) {
                  return this.examplefunction(retries - 1);
              }
              else {
                  reject("Unable to communicate with Server. Please try again later!");
              }
          }
      });
  }
  </code></pre>
  
  <p>the function is beeing called like this:</p>
  
  <pre><code>backend.examplefunction(3).then(
      (json) =&gt; {
          console.log(json);
      },
      (reason) =&gt; {
          console.log.(reason);
      }
  )
  </code></pre>
  
  <p>This code is executed in a React context, so it is also running through a babel transpilitaion. </p>
  
  <p>My problem is that when it will finally reject after x retries this results in a Uncaught Promise Error:</p>
  
  <pre><code>Uncaught (in promise) Unable to communicate with Server. Please try again later!!
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/j9Nax.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j9Nax.png" alt="enter image description here"></a></p>
  
  <p>Could anybody explain to me why this is happening?</p>