title: Handling error from async await syntax with axios
body: <p>Here's my chunk of code:</p>
  
  <pre><code>  const getToken = async () =&gt; {
      try {
        const token = await axios.post(keys.sessionURL, {
          email: keys.verificationEmail,
          password: keys.verificationPassword,
        });
      } catch (err) {
        throw new Error('Unable to establish a login session.'); // here I'd like to send the error to the user instead
      }
    };
  </code></pre>
  
  <p>So as you can see I'm connecting to external server in order to get a token. And that works. Now, I'd like to catch an error but this time not with 'throw new error' but I'd like to send it to the user, so I'd like to have something like this instead:</p>
  
  <pre><code>res.status(401).send('Unable to get a token');
  </code></pre>
  
  <p>But because I'm not inside the route handler I cannot use 'res'. How can I send it to the user then?</p>
  
  <p>Thank you!</p>