title: how to handle React axios how to handle net::ERR_CONNECTION_REFUSED
body: <p>It was asked before, but if I follow the solution still in the console there is an uncouth error:-</p>
  
  <pre><code>    getExchangeAmount(){
    var url = 'http://localhost:8080/excurrency?currency='+this.state.currency+
              '&amp;exCurrency='+this.state.excurrency+'&amp;amount='+this.state.amount 
  
      axios.get(url)
      .then(response =&gt; {
          // success
          this.setState({result: response.data})
      })
      .catch((error) =&gt; {
          // handle this error
          console.log('error: '+error);
      })
  }
  </code></pre>
  
  <p>in the console:-</p>
  
  <blockquote>
    <p>GET
    <a href="http://localhost:8080/excurrency?currency=EGP&amp;exCurrency=EGP&amp;amount=1" rel="nofollow noreferrer">http://localhost:8080/excurrency?currency=EGP&amp;exCurrency=EGP&amp;amount=1</a>
    net::ERR_CONNECTION_REFUSED</p>
  </blockquote>
  
  <p>The above is in red which is an error. how to avoid or catch this? </p>