Best practice to handle server side errors
Best practice to handle server side errors
vinodjayendra
Posts: 5Questions: 0Answers: 0
Hi,
I am looking for some good practices to follow for handling server side errors on the datatable. We have a list of server side exceptions to be caught and appropriately display a custom error message on the datatable.
Some approaches i was thinking about was
1) Return different response.status codes for each exception in json response, interpret them in datatable and display appropriate error message
2) Generate a custom error message on server side itself based on exception, return it as part of json response and display them on the datatable.
Wanted to check how best others have dealt with this before ...
I am looking for some good practices to follow for handling server side errors on the datatable. We have a list of server side exceptions to be caught and appropriately display a custom error message on the datatable.
Some approaches i was thinking about was
1) Return different response.status codes for each exception in json response, interpret them in datatable and display appropriate error message
2) Generate a custom error message on server side itself based on exception, return it as part of json response and display them on the datatable.
Wanted to check how best others have dealt with this before ...
This discussion has been closed.
Replies
Allan
Moving to implementation.
1) For processing the error message on datatable is the only way to override the fnServerData with appropriate error function ?
2) I do not want to alert the error but display the error message neatly as part of the table, checking if any sample code snippets available for this showing appropriate i being tweaked