title: BreezeJs, saveChanges() - Uncaught TypeError: Cannot read property 'statusText' of undefined
body: <p>I'm using BreezeJS with Angular to consume data from a Restful OData Service provided by an SAP Netweaver Gateway System.  The application is currently reading the data from the service correctly,  including the metadata and has this all held in the EntityManager as expected.</p>
  
  <p>However when I change the status of one of the entities and perform a saveChanges(), neither the success nor failure callbacks are called, instead a console error is displayed.</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'statusText' of undefined 
  </code></pre>
  
  <p>The code calling the save is as follows</p>
  
  <pre><code>$scope.doSave = function(){
      $scope.purchases[0].Requester = "Dave" ;
          $scope.items[0].Description = "New Description";
          if (!$scope._isSaving)
          {
              console.log("Saving!");
              $scope._isSaving = true;
              manager.saveChanges().then(function(data){
                  console.log("Saved");
                  console.log(data);
                  $scope._isSaving = false;
              }, function(error){
                  console.log(error); 
                  $scope._isSaving = false;});
          }
  }
  </code></pre>
  
  <p>Where manager is a standard Breeze EntityManager.</p>
  
  <p>The code is minified on a server and so is very hard to debug through, but this is being thrown within one of the core breeze libraries.</p>
  
  <p>The client is performing a $batch POST request to the server, and the server is responding with a 202 Accepted, as below</p>
  
  <pre><code>--0DD0586DB234C0A3D0D530A25CD1C8400
  Content-Type: multipart/mixed; boundary=0DD0586DB234C0A3D0D530A25CD1C8401
  Content-Length:       519
  
  --0DD0586DB234C0A3D0D530A25CD1C8401
  Content-Type: application/http
  Content-Length: 111
  content-transfer-encoding: binary
  
  HTTP/1.1 204 No Content
  Content-Type: text/html
  Content-Length: 0
  dataserviceversion: 2.0
  content-id: 1
  
  
  --0DD0586DB234C0A3D0D530A25CD1C8401
  Content-Type: application/http
  Content-Length: 111
  content-transfer-encoding: binary
  
  HTTP/1.1 204 No Content
  Content-Type: text/html
  Content-Length: 0
  dataserviceversion: 2.0
  content-id: 2
  
  
  --0DD0586DB234C0A3D0D530A25CD1C8401--
  
  --0DD0586DB234C0A3D0D530A25CD1C8400--
  </code></pre>
  
  <p>I'm hoping this is something that somehere here has seen before!</p>