title: Print HTML response from nginx 405 in javascript
body: <p>I have something like this</p>
  
  <pre><code>try{
      const url = 'clearlyfake';
      const response = await fetch(url);  
      //do stuff with response  
  } catch(e){
      console.log(e);
  }
  </code></pre>
  
  <p>When I hit the catch in this particular instance I get an nginx 405, which is HTML. When I go the network tab and click 'response' this is what is displayed.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;&lt;title&gt;405 Not Allowed&lt;/title&gt;&lt;/head&gt;
      &lt;body bgcolor="white"&gt;
          &lt;center&gt;&lt;h1&gt;405 Not Allowed&lt;/h1&gt;&lt;/center&gt;
          &lt;hr&gt;&lt;center&gt;nginx/1.13.5&lt;/center&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to stuff this into an error bar I created. But it is not JSON, and any JSON parsing methods I try on it give me <code>SyntaxError: Unexpected token &lt; in JSON at position 0</code></p>
  
  <p>Is there anyway to capture and display this? Or is this an nginx config issue?</p>