title: Console log raw data of a failed Axios get request
body: <p>I would like to make an Axios get request to a private server running Flask.
  In case there is an internal error in the back-end it returns an response object and an error code.:</p>
  
  <pre><code>response_object = {
      "Success": False,
      'error': err.message
  }
  return response_object, 400
  </code></pre>
  
  <p>The served response_object should be accessible the front-end (React.js).</p>
  
  <pre><code>axios
    .get(`http://127.0.0.1:5000/data`, {
      data: null,
      headers: { "Content-Type": "application/json" }
    })
    .then(response =&gt; {
      console.log(response);
    })
    .catch(function(error) {
      console.log(error.toJSON());
    });
  </code></pre>
  
  <p>I would expect the error to include the response object. If the URL is accessed manually in the browser the error data is visible. If there is no error in the back-end the get requests works properly. 
  After googling for some time I found some issues that might relate to the mentioned problem. (That is why empty data is passed in the a get request).
  <a href="https://github.com/axios/axios/issues/86" rel="nofollow noreferrer">https://github.com/axios/axios/issues/86</a>
  <a href="https://github.com/axios/axios/issues/86" rel="nofollow noreferrer">https://github.com/axios/axios/issues/86</a>
  Please note that I am self taught so I might miss something obvious here. Thank you all and all the best. </p>