mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-19 12:52:11 +01:00
New: Warning on generic Ajax error (404 etc)
- Previously DataTables would only show an error message if there was a JSON parsing error. However, if there was any other kind of error, such as a 404, it would just silently swallow the error. THink its best to show an error and a tech note.
This commit is contained in:
parent
6dcc69ee54
commit
0f18491cf1
@ -1 +1 @@
|
||||
ae0951bf93e1b87ced3c70ddf3a18ed3ae55277d
|
||||
4adf77363c60f233d2674e2eb2706032270c1839
|
||||
|
7
media/js/jquery.dataTables.js
vendored
7
media/js/jquery.dataTables.js
vendored
@ -2224,8 +2224,13 @@
|
||||
"cache": false,
|
||||
"type": oSettings.sServerMethod,
|
||||
"error": function (xhr, error, thrown) {
|
||||
var log = oSettings.oApi._fnLog;
|
||||
|
||||
if ( error == "parsererror" ) {
|
||||
oSettings.oApi._fnLog( oSettings, 0, 'Invalid JSON response', 1 );
|
||||
log( oSettings, 0, 'Invalid JSON response', 1 );
|
||||
}
|
||||
else {
|
||||
log( oSettings, 0, 'Ajax error', 7 );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user