title: Async/Await in fetch() how to handle errors
body: <p>I have stripe async code in my React app, and trying to add error handling in my code but have no idea how to handle it. i know how to do it with .then() but async/await is new to me</p>
  
  <p><strong>EDITED</strong></p>
  
  <p>added .catch() i got errors in network tab in response tab.
  but i can log it to console?</p>
  
  <pre><code>    submit = async () =&gt; {
      const { email, price, name, phone, city, street, country } = this.state;
      let { token } = await this.props.stripe
        .createToken({
          name,
          address_city: city,
          address_line1: street,
          address_country: country
        })
        .catch(err =&gt; {
          console.log(err.response.data);
        });
  
      const data = {
        token: token.id,
        email,
        price,
        name,
        phone,
        city,
        street,
        country
      };
  
      let response = await fetch("/charge/pay", {
        method: "POST",
        headers: {
          "Content-Type": "application/json"
        },
        body: JSON.stringify(data)
      }).catch(err =&gt; {
        console.log(err.response.data);
      });
      console.log(response);
      if (response.ok)
        this.setState({
          complete: true
        });
    };
  </code></pre>
  
  <p>thanks</p>