How to send JSON Error response

How to send JSON Error response

ManiHInManiHIn Posts: 17Questions: 4Answers: 0
edited March 2019 in Free community support

In case of a Exception i am currently returning the following JSON:

{"error":"an error ocurred"}

But somehow this is not a valid JSON for Datatable Editor. Can someone provide me with a valid error JSON response?
Does it have to be like this?:

{
    "error": [
        {
            "message":"an error ocurred"
        }
    ]
}

stay tuned and thank you guys

Answers

  • allanallan Posts: 64,904Questions: 1Answers: 10,748 Site admin

    No - that should be perfectly valid. Can you give me a link to your page showing the issue please?

    Allan

This discussion has been closed.