Customize a standard error message
Customize a standard error message
klermann
Posts: 277Questions: 67Answers: 1
Hello. How can I customize a default editor error message and put or configure a correct message in place of this default message that comes pre-configured no editor? This system error has occurred (More information).
This discussion has been closed.
Answers
This is found and can be changed i18n settings. The i18n.error.system property.
There is an example for how to define it on:
https://editor.datatables.net/reference/option/i18n
I'm not sure if this can be done by changing the defaults so it doesn't have to be specified for each Editor instance.
Hello, I would like to recover the error and refer to the User and not just a default message
System errors should not be referred to the user. What would you expect the user to do about it?
Tangerine. I really can not wait for the user to do anything in the face of an error. But I need to customize the system error message and return to the user. I'm getting the error treating and returning to the user, but I need a personalized message for each error!
That error will happen if the server replies with invalid JSON, as the documentation that the error links to mentions.
If the server-side returns invalid JSON, when the client-side is expecting JSON, there really isn't all that much that can be done. Basically the server should never be returning anything but JSON - anything else is a development error.
Allan