Customize a standard error message

Customize a standard error message

klermannklermann 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).

Answers

  • rduncecbrduncecb Posts: 125Questions: 2Answers: 28

    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.

  • klermannklermann Posts: 277Questions: 67Answers: 1

    Hello, I would like to recover the error and refer to the User and not just a default message

  • tangerinetangerine Posts: 3,348Questions: 36Answers: 394
    edited October 2017

    System errors should not be referred to the user. What would you expect the user to do about it?

  • klermannklermann Posts: 277Questions: 67Answers: 1

    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!

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    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

This discussion has been closed.