How to get more detailed errors after a RPC call failed?

I am sending a list of PARTIAL_MODIFY_DOCUMENT_OPERATION through a RPC call to DataServices.

For some reason validation fails but all I get is the following error response (in the RPC result):

{
  "level" : "ERROR",
  "title" : {
    "key" : "rpc.operation.error",
    "default" : "JSON-RPC Request failed and rollback was performed"
  },
  "description" : {
    "key" : "rpc.operation.error",
    "default" : "Unable to invoke validation"
  },
  "details" : {
    "code" : "-32035",
    "subsystem" : "GENERAL",
    "time" : "2024-12-05T14:32:04.969+0100"
  },
  "source" : "",
  "timestamp" : "2024-12-05T13:32:04.969+0000",
  "logId" : "e062d579-d1ce-4313-9f8a-4fc79c4dee3d",
  "stacktrace" : null,
  "exception" : null
}

And in the DS logs I only see:

2024-12-05 14:41:13,979 DEBUG o.s.w.s.DispatcherServlet POST "/api/v2/rpc", parameters={}
2024-12-05 14:41:13,980 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping Mapped to com.mgmtp.a12.dataservices.server.rpc.JsonRpcControllerImpl#jsonRpc(InputStream, String)
2024-12-05 14:41:14,151 DEBUG o.h.SQL select mr1_0.model_id,mr1_0.alias,mr1_0.reference_type,mr1_0.purpose,mr1_0.reference_id from model_references mr1_0 where mr1_0.model_id=?
2024-12-05 14:41:14,153 DEBUG o.h.SQL select l1_0.model_id,l1_0.locale from model_locales l1_0 where l1_0.model_id=?
2024-12-05 14:41:14,153 DEBUG o.h.SQL select l1_0.model_id,l1_0.locale,l1_0.text from model_labels l1_0 where l1_0.model_id=?
2024-12-05 14:41:14,154 DEBUG o.h.SQL select a1_0.model_id,a1_0.name,a1_0.annotation_value from model_annotations a1_0 where a1_0.model_id=?
2024-12-05 14:41:14,174 DEBUG c.m.a.k.m.r.i.s.DocumentAbstractRtService Validation call prepared in '00:00:00.013'
2024-12-05 14:41:14,174 DEBUG c.m.a.k.m.r.i.s.DocumentAbstractRtService Executing method 'full validation'
2024-12-05 14:41:14,175 DEBUG c.m.a.k.m.r.i.s.DocumentAbstractRtService === 'MandantVA_DM' Validation executed in '00:00:00.001'
2024-12-05 14:41:14,176 INFO c.m.a.d.r.i.JsonRpcOperationDispatcher Exception occurred during execution of the RPC request, Rollback of the operation has been triggered
2024-12-05 14:41:14,177 DEBUG c.m.a.d.r.i.RollbackPostProcessor Rollback caches have been evicted
2024-12-05 14:41:14,177 DEBUG c.m.a.d.r.i.RollbackPostProcessor Rollback caches have been evicted
2024-12-05 14:41:14,178 DEBUG o.s.w.s.m.m.a.HttpEntityMethodProcessor Using 'application/json', given [application/json] and supported [application/json]
2024-12-05 14:41:14,179 DEBUG o.s.w.s.m.m.a.HttpEntityMethodProcessor Writing [Byte array resource [resource loaded from byte array]]
2024-12-05 14:41:14,179 DEBUG o.s.w.s.DispatcherServlet Completed 200 OK
2024-12-05 14:41:14,179 DEBUG c.m.a.d.r.i.RollbackPostProcessor Rollback caches have been evicted

How can I find the reason why the validation failed?

If I use the JSON that would be the result of the modification and open it in the SME’s “Ad hoc testing”, it validates fine.

Hi @thomas-soft-grove ,

Please create a ticket with model, existing document and the PARTIAL_MODIFY_DOCUMENT payload. We will take a look. It is hard to know now. This feature is not integrated to the client, therefore there were no requirements on the error reporting. We might also add mapping to validation error in response.

Done: A12-16719 (I am not allowed to post the link here)

Note that the request is sent from a Java application (using a JsonRpc2Request and RpcOperationsClient) not from the browser.

When I load the entire document, set the field values and then write the document back (using MODIFY_DOCUMENT) the document is saved without an error (which is my current workaround)

Thanks for the ticket, We will take a look and let you know

The fix of the issue as described in A12-16719 is planned for 2024.06-ext4.