javascript - BreezeJs, saveChanges() - Uncaught TypeError: Cannot read property 'statusText' of undefined -


I used a SAP networkware gateway system provided by an anchor to consume data from the Odata service, with bridges of glass I am using. The application is currently reading data correctly from the service including metadata and as expected it has been organized in all EntityManager.

However, when I change the position of one unit and save it (), neither the success and failure callback is called, instead a console error is displayed.

  Unicode Type Error: Unconstrained  

Can not read property 'status text' The save code is as follows:

  $ Scope.doSave = function () {$ scope.purchases [0] .rever = "Dave"; $ Scope.items [0] Details = "new details"; If saving (! $ Scope._is) {console.log ("Saving!"); Save $ scope._is = true; Manager.saveChanges () Then (function (data) {console.log ("saved"); console.log (data); $ scope._is save = false;}, function (error) {console.log (error); $ scope._is Save = false;}); }}  

The Manager is a standard Breeze Entity Manager.

The code is directed to a server and therefore is very difficult to debug, but it is being thrown into one of the core air libraries.

/ Mixed; 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--

I hope this is something herehereherehere before seen

Finally it is connected to the Oguda Holding of SAP Netweaver Gateway. It sends a header when it should not be, and sends the "Content-ID" header as Content-ID.

To fix them, I finished to add lines to read in datajs.1.1.1

  if (response.statusCode> gt; = 200 & amp; nbsp; ; Amp; amp; response.statusCode & lt; = 299) {partHandler (context.handlerContext) .read (feedback, reference. HandlerContext); } Else {// Keep track of failed responses and continue the batch process. Feedback = {Message: "HTTP request failed", response: feedback}; }  (response.statusCode> = 200 & response.statusCode & lt; = 299) {if (response.statusCode! =)  
204) partHandler (context.handlerContext). Reed (Reaction, Reference. Hendler Contact); } Else {// Keep track of failed responses and continue the batch process. Feedback = {Message: "HTTP request failed", response: feedback}; } Change line 15.76 of .debug.js from

and

  var contentId = cr.headers ["Content-ID"];  

to

  var contentId = cr.headers ["content-id"];  

Resolved this problem and ensured that the response was dealt with correctly.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -