Error Handling for cammunda 8 rest connector

We have multiple subprocess and inside subprocess we have rest connector and message intermediate throw event.We are unable to capture the incident/error details for Java zeebe client.

any reference how to capture the error details.

Hi @sonalidas are you using jobworkers or the REST Connector available via the Out-Of-The-Box Connectors?

Does this help: Using Connectors | Camunda 8 Docs

We are using Jobworker(Zeebe) for java client and rest output connector for the workflow.

Attached the workflow for reference:

Code we have used for:
public Mono startProcessInstance() {“Starting process " + BPMN_PROCESS_ID + "”);
String requestId = UUID.randomUUID().toString();
Map<String, String> variables = Collections.singletonMap(“requestId”, requestId);

// TODO: Add exceptionally

// TODO: Think about exception handling here as well
// TODO: Where to define timeout exactly?
return Mono.create(
    sink -> {
      // define a unique job type just for this conversation
      String jobType = "responseFor_" + requestId;
      // And start a worker for it
      ZeebeWorkerValue jobWorkerConfig = new ZeebeWorkerValue();

      JobWorker jobWorker =
              (client, job) -> {
                // Read payload from process
                String response = (String) job.getVariablesAsMap().get("response");
      ".. finished with response: `" + response + "`");
                // When the job is there, read the response payload and return our response via
                // the Mono
      // Make sure this worker is closed once the response was received
      sink.onDispose(() -> jobWorkerManager.closeWorker(jobWorker));