Show error upon server error

I’m looking for a way to detect errors that have happened on the server and then show these errors to the user on the client side.

When an any action (create, update or delete) is done on the server I send the following content to indicate the status:

<data>
    <action type="error" sid="1" tid="1"></action>
</data>

When you click the delete button for example on an event and I return the above segment of xml the event is not deleted (correct behavior) but the event gets a line through it’s text indicating something. I guess it is indicating that the event could not be deleted or something. The behavior is the same for the create and update actions. The action is executed on the client (making the user think the action has been executed) even though the server has indicated that an error has occurred.

I’m looking for a way to detect (on the client) when an action (delete, update or create event) has returned an error and then display the error to the user as to make him understand that the action he tried to do was not executed.

dataProcessor has some events
docs.dhtmlx.com/doku.php?id=dhtm … sor:events
one of which can be used in your case

docs.dhtmlx.com/doku.php?id=dhtm … fterupdate

dp.attachEvent("onAfterUpdate", function(sid, action, tid, tag){
   if (action == "error"){
         alert("error occurs");
   }
})

You can provide some additional info as attribute of the error tag
<action type=“error” details=“some info” …
and on client side use
tag.getAttribute(“details”)