Webservice error handler not invoked for POST request on ICS.

I faced a weird issue with the webservice component. I have a login form and I need to validate the user. So I make an ajax request to server for validation. When I give correct credentials it is moving to the success handler. But when I give wrong credentials it is not moving to the error handler (status code 401). The same is working in Gingerbread device and in the windows PC chrome browser.

Comments

  • Are you using Enyo 2.1? We reworked a bit of that code.

    Do you know what's being sent by the server on credential fail?
  • Thanks for your reply. I have upgraded to the Enyo 2.1. But the issue is still there. From the server I get the response "Unauthorized". When I checked in the chrome the status code is "401". I traced the webservice kind and what I could see is that control reaches till request() method in theAjax.js . On success the callback receive() is invoked. On failure this callback is not invoked. Even no exception occurs in between. Any ideas on this issue? Thanks in advance.
  • Try to add some logging to the inXhr.onreadystatechange definition in xhr.js (around line 70) and see what calls you get to this. Are you running directly in the browser or going through PhoneGap?
  • I have tried what you have suggested. I have observed that when entered the correct credentials the control moves to makeReadyStateHandler First the inXhr.readyState=1 and then it changes to 4; and correspondingly inXhr.onreadystatechangeis invoked. But when I enter the wrong credentials it reaches till code>makeReadyStateHandler shows inXhr.readyState=1 and then no invoking of inXhr.onreadystatechange. I run through phonegap and with the latest framework. I checked the response from the server through browser where I get response "Unauthorised" with error status 401 But the content type of response is text/html and in the request I specify contentType: "application/json",. Does that the issue? Any help on this issue. Thanks in advance.
Sign In or Register to comment.