ajax error callback

ajax error callback

AlekhineGunnAlekhineGunn Posts: 2Questions: 0Answers: 0

The API provides callbacks for successful AJAX calls but what about when something goes wrong? For example, if the user's session has been killed, the REST call might return a 403. How do I deal with that? For example, ajax.reload only provides a success callback as far as I can tell.


  • kthorngrenkthorngren Posts: 6,084Questions: 21Answers: 1,347

    I think you should be able to use the error function that can be defined in the ajax option. According to the docs:

    As an object, the ajax object is passed to jQuery.ajax allowing fine control of the Ajax request. DataTables has a number of default parameters which you can override using this option.

    However the success parameter should not be overridden.


  • AlekhineGunnAlekhineGunn Posts: 2Questions: 0Answers: 0

    Thank you! All set!

Sign In or Register to comment.