when I jump to a new page, my Odata.read call gets an error - instead of an abort message.

Jan 31, 2014 at 2:05 PM
When a page loads, I call "OData.read", to read in a list of objects from a remote web-service. This works well. My code looks something like this:
   OData.read({ requestUri: oDataURL },

      function (data, request) {
            // do stuff with a successful request
      }, function (err) {
          alert("An error occurred " + err.message);

This service can take a few seconds. In the meantime, if I click another link on my page (forcing window.location to change) then the error-block gets called. But the message is not "Request aborted", but the "HTTP Request failed" message. How do I detect the case where the page has changed, and I should treat this error as someone getting impatient?