404 and error handling

3 posts, 0 answers
  1. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 02 Sep 2013 Link to this post

    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. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 02 Sep 2013 Link to this post

    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.
  3. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 02 Sep 2013 Link to this post

    Dear Steve

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

    Markus
Back to Top