title: Can't access response payload in javascript
body: <p>I'm making a registration page that sends a players data to the backend to then be processed. I want my page to display the error that occurred whilst trying to log in.</p>
  
  <p>This is what I currently have as fetch. It works great but I want to display the exact error that occurred. </p>
  
  <pre><code>    fetch(url,
          {
              method: "POST",
              body: JSON.stringify(registration),
              headers: {
                  'Accept': 'application/json',
                  'Content-Type': 'application/json'
              }
          })
          .then((response) =&gt; {
              if (response.status === 200) {
                  location.href = "../login/login.html";
              } else {
                  throw `Error with status ${response.status}.`;
              }
          })
          .catch((error) =&gt; {
              showError(error);
          });
  </code></pre>
  
  <p>In inspector mode, in the network tab, I found this as response payload: </p>
  
  <pre><code>{"errors":{"Email":["The Email field is not a valid e-mail address."],"Password":["The field Password must be a string or array type with a minimum length of '6'."]},"title":"One or more validation errors occurred.","status":400,"traceId":"something"}
  </code></pre>
  
  <p>I'd like to display that the errors but when I try</p>
  
  <pre><code>console.log(response.errors)
  </code></pre>
  
  <p>I get undefined.</p>
  
  <p>In short. I want to be able to access the JSON in the response payload in my javascript.</p>