RESTful model HTTP response codes

RESTful model HTTP response codes

Albert O'BalsamAlbert O'Balsam Posts: 3Questions: 2Answers: 0

Although RESTful isn't a standard as such, just a concept, the typical mapping of HTTP methods and the response codes, tends to use the response code to signify whether the action was successful or not.

So for example, it is common to use a 404 for when the ID is invalid, 403 for when the user does not have rights to perform the action, and 400 or 422 response for when the values/parameters are incorrect.

At the moment, by default, anything other than a 2xx response seems to freeze the Editor.

Is this something that can be worked into the future version of the control as a set of options?

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    It shouldn't freeze Editor, it should display a general notification saying that an error occurred. You should still be able to modify the data and then try to resubmit it - is that not working for you?

    Having said that, the ajax option of Editor (and DataTables) but inherit all of the options of jQuery's $.ajax method, so you can specify individual callbacks for the different status codes if that is suitable for your application - jQuery docs - statusCode section.

    Allan

This discussion has been closed.