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

404 and error handling

2 Answers 60 Views
Off-Topic
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Markus
Top achievements
Rank 2
Markus asked on 02 Sep 2013, 01:05 PM
Can anyone tell me how to do some error handling in Icenium, JS 

If for any reason my www.mydomain.com  Server is down the app will display an endless loading icon. Which of course is not really nice.

How to approach this?

Markus

app.dataSource = function() {
 
    var myDataSource = new kendo.data.DataSource({
        
        transport:{
            read:{
                url: "http://www.mydomain.com/api/T_dpd_verses/GetTodaysVers/" + dayOfYear + "/" + window.localStorage.getItem("Sprache"),
                data:{
                    Accept: "application/json"
                }
            }
        }
        ,
        schema: {
            model: {
                id: "myVerses",
                fields: {
                    VDay :{},
                    VID :{ type: "string" },
                    VLanguage : { type: "string" },
                    VText: {  },
                    VVers : { type: "string" },
                }
            }
        }
    });
  return myDataSource;  
 
}

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 02 Sep 2013, 01:26 PM
Hi Markus,

You could listen on the requestEnd or error event of the Kendo UI DataSource to detect log in success or failure/timeout etc.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Markus
Top achievements
Rank 2
answered on 02 Sep 2013, 01:28 PM
Dear Steve

Thank's for the quick answer and pointing me into the right direction.

Markus
Tags
Off-Topic
Asked by
Markus
Top achievements
Rank 2
Answers by
Steve
Telerik team
Markus
Top achievements
Rank 2
Share this question
or