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

Error handling in official release

2 Answers 251 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Mo
Top achievements
Rank 1
Mo asked on 24 Jul 2012, 12:05 AM
According to the documentation, the error handling arguments are the same as for $.ajax(). But this appears not to be the case, as the 2nd and 3rd parameters are always null. What arguments can we expect?

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 26 Jul 2012, 08:38 AM
Hello Morad,

I have already replied to your question in the support ticket that you submitted on the same subject. I will paste my reply here as well, so the other users who are interested in error handling could read it.

The error event of the dataSource has only one argument and the $.ajax() error information is part of it. You should expect one argument which will contain the ajax error data. 
error: function(e) {
    e.xhr //jqXHR
    e.status //textStatus
    e.errorThrown //errorThrown
    e.sender //the dataSource client object
}

To avoid any duplication, I would like to ask you to continue our conversation in the support thread.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Connections Academy Developer
Top achievements
Rank 1
answered on 19 Nov 2012, 04:16 PM
The error function isn't being reached for me; instead I see that jQuery got a bad request and doesn't send it to the function....

  1. POST http://theurl 400 (Bad Request) jquery-1.7.2.js:8240
    1. jQuery.extend.ajaxjquery-1.7.2.js:7719
    2. p.extend.createkendo.all.min.js:9
    3. (anonymous function)kendo.all.min.js:9
    4. jQuery.extend.Deferredjquery-1.7.2.js:1306
    5. o.extend._promisekendo.all.min.js:9
    6. o.extend._sendkendo.all.min.js:9
    7. o.extend.synckendo.all.min.js:9
    8. h.extend.saveRowkendo.all.min.js:9
    9. (anonymous function)kendo.all.min.js:9
    10. jQuery.event.dispatchjquery-1.7.2.js:3332
    11. elemData.handle.eventHandlejquery-1.7.2.js:2941

... what would cause the error function to not be reached?
Tags
Data Source
Asked by
Mo
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Connections Academy Developer
Top achievements
Rank 1
Share this question
or