Server error handling
Server error handling
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I allow expressions in a search field, like "$ != 0" where $ a placeholder for the variable to search.
The server code checks if the syntax is valid and must report back to the user if it's not the case.
I wonder how I can intercept the error and display it on the client side.
Answers
Are you using server side processing? If yes then see the docs for the “error” response parameter in this doc.
https://datatables.net/manual/server-side#Returned-data
If this doesn’t help then please provide more details of how you are performing the search. Include the Datatables init code and other relevant client side code.
Kevin
Thank you very much, the error parameter did it!