Datatables stuck on "Processing" after an error

Datatables stuck on "Processing" after an error

swisstoneswisstone Posts: 1Questions: 0Answers: 0

Hello,

i'm using DataTables 1.10.15 and i have the following issue:

Sometimes, during the retrieval of data via ajax, the server fails and returns a 500 error. I added a handler for the errors that raises an alert():

 "ajax": {
    error: function (jqXHR, textStatus, errorThrown) {
      //error handling
      alert("...");
}

but after the alert() is shown, the DataTable is stuck in "processing" mode.

How can i reset this status so the datatable stops saying "Processing" ?

Thanks

Replies

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    Hi @swisstone ,

    That's the expected behaviour - see the explanation in the thread here.

    Since that blog though, you can over-ride it. If you set the action to null in $.fn.dataTable.ext.errMode, it will ignore the error.

    Cheers,

    Colin

This discussion has been closed.