Xdatawebclient post error

I tried saving a record but it did not save and no exception was raised in the try except clause of the applyupdates method. I checked the chrome network tab and saw that there was a primary key violation. Is it possible to trap somewhere in the program ?

You can use event OnAfterAppyUpdates, there you have a Info parameter of type TResolveResults with lots of information about the records and error messages.




  TResolveInfo = record
    Data : JSValue;
    Status : TUpdateStatus;
    Error : String; // Only filled on error.
    BookMark : TBookmark;
    _private : JSValue; // for use by descendents of TDataset
  end;
  TResolveInfoArray = array of TResolveInfo;


  TResolveResults = record
    Records : TResolveInfoArray;
  end;




procedure TForm1.XDataWebDataset1AfterApplyUpdates(Sender: TDataSet;
  Info: TResolveResults);
begin
  console.log(Info.Records);
end;