handle non json response's

Some times response is:
```
<!DOCTYPE html>\n<html lang="en">\n<head>\n  <m
eta charset="utf-8">\n  <title>400 - Oauth error invalid_request</title>\n  <link
rel="stylesheet" type="text/css" href="//cdn.shopify.com/s/stylesheets/error.css">
\n</head>\n\n<body class="status-error status-code-500">\n\n  <div class="wrapper"
>\n    <div class="box clearfix">\n\n      <div class="box-content-wrap">\n
 <div class="box-header">\n          <h1>Oauth error invalid_request</h1>\n
 </div>\n        <div class="box-content">\n            <p>  (request_id: xxxxxxxxxxxxxxxx)</p>\n\n\n          <div class="box-content-footer">\
n            <p><a href="javascript:history.back()">Go back to previous page</a></
p>\n          </div>\n\n        </div>\n      </div>\n\n      <div class="error-co
de">\n        <p class="error-code-number">400</p>\n        <p class="error-code-t
itle">Error</p>\n      </div>\n\n    </div>\n\n    <div class="footer">\n      <p>
\n        <a href="http://www.shopify.com/pos" target="_blank">Point of Sale</a>\n
        and\n        <a href="http://www.shopify.com" target="_blank">Ecommerce So
ftware</a>\n        by Shopify.\n        <a href="http://www.shopify.com/tour/sell
-online" target="_blank">Sell your products</a>\n        using the Shopify\n
  <a href="http://www.shopify.com/pricing" target="_blank">Ecommerce Platform</a>.
\n      </p>\n    </div>\n  </div>\n\n</body>\n</html>\n
```