This is a migrated thread and some comments may be shown as answers.

How to catch an error

2 Answers 11 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yonggu Kang
Top achievements
Rank 1
Iron
Yonggu Kang asked on 11 Dec 2013, 02:39 AM
Hi telerik,

I'm suffering strange error depending on android version.
It's a kind of Ajax post call which works fine on version 4.0 but no luck over than 4.1version.
Though it's coded to show error message but nothing displayed, screen just stayed dumb.
I have no way to know what's going on inside. Folloiwng is my Ajax call of viewmodel.

  _sendWhInRqst : function(action) {
            var that = this;
            var actionRqst = {"ActionType": action, "WhInPartList": this.get("WhInParts"), "User": App.Config.GetUser()};
            App.ShowBusy(true);
           
   $.ajax(
    {
                url: App.Config.BaseUrl + "/mobileRpc/DoWhInAction",
    type: "POST",
    contentType: "application/json; charset=utf-8",
    data: JSON.stringify(actionRqst),
    processData: false,
    dataType: "json",
    success: function (result) {

                    App.ShowBusy(false);
                    that.ShowCustList();
    },
    error: function (xhr, status, p3, p4) {
     App.ShowBusy(false);
                    var errMessage = App.GetErrorMessage(xhr, status, p3, p4);
     that.SetError(errMessage);
    }
   });
        },

 SetError : function(errMessage) {
   this.set("errorMessage", errMessage);
  }

As I said, this Ajax call works fine in androind version 4.0.x and in the server side as well.
However in version over than 4.1.x, nothing happended at server side and u.i just stays as dumb.
I don't know how to catch what happened at Ajax call in real device. I'm using jQuery v1.9.1.

Any advice would be appreciated.

RGDS
Kang







2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 13 Dec 2013, 04:38 PM
Hello Kang,

We're not aware of any changes affecting ajax requests in Android v.4.1 or later. You can setup an http debugging proxy like Fiddler to intercept the device traffic i.e. track the requests/responses - this would help you identify the culprit by giving you a status code or more meaningful error. If you need to debug, a remote debugger would help,  you can check out these posts from our blog for pointers and walkthroughs:


Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 20 Dec 2013, 12:50 PM
Hi steve,

Thank you for your reply.
 I nearly give up to get any help as it was so vague question.
But your advice hit me to test with fiddler what's actually coming in and out.
I don't have newer machine in my hand at this time,but will try shortly.

Thank you so much.

RGDS
HK.Lee

Tags
General Discussion
Asked by
Yonggu Kang
Top achievements
Rank 1
Iron
Answers by
Steve
Telerik team
Yonggu Kang
Top achievements
Rank 1
Iron
Share this question
or