title: JS fetch print details of bad request response
body: <p>I am trying to use Django-rest-auth, I am getting it to work but often I get Bad request HTTP 400. In Django-rest-auth generated view I can see the details of the error (i.e username contains unaccepted chars or pwd do not match).</p>
  <p>How can I get this information on frontend js side ? For now I was trying to just console the whole response but cannot find it in there</p>
  <pre><code>    const registerUser = async (user ) =&gt; {
        console.log( JSON.stringify(user))
        const response = await fetch(&quot;/api/dj-rest-auth/registration/&quot;, {
          method: &quot;POST&quot;,
          headers: {
            &quot;Content-Type&quot;: &quot;application/json&quot;
          },
          body: JSON.stringify(user)
        });
  
        if (response.status === 201) {
          console.log('did it ! !!! !! !!! ! !! ')
          let data = response.json()
          localStorage.clear();
          localStorage.setItem('authToken', data.key);
  
        } else {
          console.log(response);
        }
      };
      
  </code></pre>