camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.1k stars 1.55k forks source link

[BUG] Error Message is not being logged when exception is thrown by BPMN Error #4667

Open sowmyahl21 opened 2 days ago

sowmyahl21 commented 2 days ago

Environment

Description

When a exception is thrown by BPMN Error, the associated error message is not being logged along with the status code BpmnBehaviorLogger.java This makes it difficult to diagnose the root cause of the error as only status code will be logged when an exception is thrown. We can see the same in the below attached screenshot image

Steps to reproduce

Create a sample model which throws BPMN Error and observe that the error code is captured but the error message is not available.

Observed Behavior

Currently, when the BPMN error is thrown, the error code is captured but the error message is not available. We can see the same in the above attached screenshot.

Expected behavior

When the exception is thrown by BPMN error, it would be helpful to log the error message along with the error code which helps for easier debugging.

Root Cause

Solution Ideas

Update the exception message in BpmnBehaviorLogger to display the error message along with other parameters.

These files may have to be modified https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/behavior/BpmnBehaviorLogger.java

https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/helper/BpmnExceptionHandler.java

Hints

Links

Breakdown

### Pull Requests

Dev2QA handover

sowmyahl21 commented 1 day ago

I'm interested to work on the fix. Please let me know if there are any concerns

mboskamp commented 20 hours ago

Hi @sowmyahl21, thank you for raising a bug report. It's awesome to hear that you want to contribute a fix.

I have some questions before we commit to changing the behavior: