Send back server side error on create/edit/delete
Send back server side error on create/edit/delete
eon_nordic_one
Posts: 5Questions: 0Answers: 0
When something goes wrong on the server and I set the response status to 400 the editor client will give me the standard "An error has occurred - Please contact the system administrator" which is fine. But in some cases I would like to send back an error message as json. I can see that there is the sError field in the examples. I can't figure out how to use it though to replace the standard error message?
regards
/h
regards
/h
This discussion has been closed.
Replies
However, I suspect that if you are returning a 400 error, what you will need to do is use the `onSubmitError` event handler ( https://editor.datatables.net/api/#onSubmitError ) and the `error()` API method to show your message, since Editor will show a generic (although configurable through the i18n options) error message when jQuery falls into its error handler.
Allan
Ok but the onSubmitError doesn't contain a JSON object and that's where my message is? Or am I missing something?
/Harald
Allan