title: Error handling in Express after axios call
body: <p>I'm working on building a proxy app using express + axios (for the first time). Basically all the app will do is retrieve some data from an API and then send the response using express.</p>
  
  <pre><code>async function getInfo() {
    try {
      const response = await axios.get(url);
      return response.data;
    } catch (error) {
      return error.response.data;
    }
  }
  
  const info = getInfo();
  
  export default (req, res) =&gt; {
    return res.status(200).send(info);
  };
  </code></pre>
  
  <p>I'm a bit confused on how to handle errors if the API returns an error, as part of the default export for Express should I have a condition for each error code?</p>