title: Ajax/Javascript How to log this error?
body: <p>I am trying to build a Chrome extension where you can land on any webpage and click on the extension, which will grab the page's title and URL. The extension then sends this data to a form hosted on a specific website and submits the form. </p>
  
  <p>My Chrome extension console is not currently logging any errors, yet the data appears to not be sending. I can't figure out how to get sent whatever error is occurring -- right now the error that I get is just my website's HTML; before when I was messing around with the error field I was getting [object object].</p>
  
  <p>Here is my Javascript file:</p>
  
  <pre><code>function getCurrentTabUrl(callback) {
      var queryInfo = {
        active: true,
        currentWindow: true
      };
  
      chrome.tabs.query(queryInfo, function(tabs) {
        var tab = tabs[0];
        var url = tab.url;
        console.assert(typeof url == 'string', 'tab.url should be a string');
        callback(url);
      });
  }
  
  function getCurrentTabTitle(callback) {
      var queryInfo = {
        active: true,
        currentWindow: true
      };
      chrome.tabs.query(queryInfo, function(tabs) {
        var tab = tabs[0];
        var title = tab.title;
        callback(title);
      });
  }
  
  document.addEventListener('DOMContentLoaded', function() {
      getCurrentTabTitle(function(title) {
        console.log('TITLLEEEEEEEEE' + title)
  
          getCurrentTabUrl(function(url) {
            console.log('URLLLLLLL' + url)
  
              $.ajax({
                type: "POST",
                url: website,
                data: "clips_url="+ url +"clips_article_title="+ title,
                success: "success",
                dataType: String,
                error: function(errorMessage) {
                    console.log('ERROR: ' + errorMessage.responseText);            
                }
              });
          });
      });
  });
  </code></pre>