title: Get Axios frontend Promise to receive errors msg from Rails backend
body: <p>In Rails I'm returning:</p>
  
  <pre><code>render json: { errors: e.response.body.errors }, status: 400
  </code></pre>
  
  <p>In JavaScript I'm using Axios:</p>
  
  <pre><code>axios.patch('/settings/account', {}, {params: {...
      } })
    .then((e)=&gt; {
      ...
      console.log('submitted')
    })
    .catch(function (error, res) {
      // only get error that gives 400, but not error msg here, res isn't here
      console.log(error);
    });
  </code></pre>
  
  <p>How do I get the <code>e.response.body.errors</code> on my frontend?</p>