Camunda Rest Api - Retrieving exception details & DMN null identifier issue

Hello,

I am using the Camunda Engine with its Rest API capabilities, with C# micro services (version 7.8)
I wanted to ask about two things.

  1. I am trying to figure out how to retrieve exception details via the Rest API.
    At the moment I got something similar to this -
    I start a new workflow instance, and i initialize a listener which then keeps checking if the instance status was changed to Completed (via the Camunda Rest API).
    Once it was completed i am trying to retrieve a special variable ( which i only set up for when i got a business error in process instance ) if it doesnt exist i can assume there were no business errors.
    My problem is when there is a technical error. I log the error and send a
    external-task/{id}/bpmnError http request to the engine which ends the instance and changes the status to Completed, but i dont have any indication about the error and its details.
    I can add a storage of my own for those errors and make another check for it but i would rather have Camunda handle everything related to the workflow.
    Is there maybe a way to retrieve the errorCode variable which i send with the BPMN Error http request? If it possible I can then store the exception details in it and use it in a similar way to my business error details variable.
    P.S. Or maybe my whole approach is wrong?

  2. My other problem is with the use of DMN table. At some situations ( if my order doesnt exist for example ) I skip a few tasks and some of the identifiers/variables which the DMN table uses remains null which results in a “Cannot resolve identifier” exception from the Camunda engine.
    I was wondering if there is a way to overcome this? because i dont want/need to fill all of those variables on every process instance. For example, I got desicion rules which are being based on only one identifier.
    I can probably add a script task which sets all not used DMN variables to a default value but i think it might become a little problematic

I hope i was clear enough about my problems and any help will be must welcomed.
Thank you from advance.