Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAM-11819 improve ProcessEngineException message #787

Closed

Conversation

SolarBilling
Copy link
Contributor

Currently when a task listener throws an exception, Camunda displays a message something like:

"ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'ENGINE-07002 Exception while notifying process application task listener."

This gives the user no clue what went wrong because it throws away the message from the original exception and it includes duplicated information which is meaningless to the end user.

This change request prevents the duplicated information and includes the message from the original exception in the new exception, so that it may display something meaningful to the user.

@tasso94 tasso94 self-requested a review April 24, 2020 06:50
@tasso94
Copy link
Member

tasso94 commented Apr 24, 2020

Hi @SolarBilling,

Thank you for your contribution.

I will look into it and come back to you with feedback – next week at the latest.

Stay tuned!

Best,
Tassilo

@tasso94
Copy link
Member

tasso94 commented Apr 28, 2020

Hi @SolarBilling,

Thank you for your contribution.

I'm not sure about the following changes:

    if (e instanceof ProcessEngineException) {
      return (ProcessEngineException)e;
    }

If I understand your use case correctly, adding the exception message of the initially thrown exception to the new ProcessEngineException should be enough, right?

Best,
Tassilo

@SolarBilling
Copy link
Contributor Author

Hi @SolarBilling,

Thank you for your contribution.

I'm not sure about the following changes:

    if (e instanceof ProcessEngineException) {
      return (ProcessEngineException)e;
    }

If I understand your use case correctly, adding the exception message of the initially thrown exception to the new ProcessEngineException should be enough, right?

Best,
Tassilo

You are correct that adding the exception message of the initially thrown exception to the new ProcessEngineException is the most important part of the change request and would be a big improvement by itself.
If you just did that, then if the error message is "invalid email address" for example, it would display:

ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'ENGINE-07002 Exception while notifying process application task listener: invalid email address

That's a lot better than just "ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'ENGINE-07002 Exception while notifying process application task listener." which gives the user no clue what went wrong but it's still ugly and hard for users to read.
With the addition of the change above, the error message displayed becomes "invalid email address" if the listener throws a ProcessEngineException or
"'ENGINE-07002 Exception while notifying process application task listener: invalid email address" if the listener throws some other exception, which is more succinct as it doesn't repeat itself - "There was an exception while invoking the TaskListener" means the same thing as "Exception while notifying process application task listener".

@tasso94
Copy link
Member

tasso94 commented Apr 28, 2020

Hi @SolarBilling,

Thank you for the clarification.

I would prefer the nested messages since it makes transparent to the user where the exception was thrown initially but also indicates that it happened in the context of a process application. This also helps third parties (e.g. in our forums) by just looking at the logs to get a better understanding of the used architecture.

Would you mind removing the if branches?

Best,
Tassilo

@SolarBilling
Copy link
Contributor Author

I have made the change you requested.

@tasso94 tasso94 changed the title improve ProcessEngineException message CAM-11819 improve ProcessEngineException message May 11, 2020
@tasso94
Copy link
Member

tasso94 commented May 11, 2020

Hi @SolarBilling,

sorry for my late response.
I'll recheck your changes today or tomorrow at the latest.

Stay tuned!

Best,
Tassilo

tasso94 pushed a commit that referenced this pull request May 12, 2020
@tasso94
Copy link
Member

tasso94 commented May 12, 2020

Hi @SolarBilling,

Thank you again for your contribution.

I just merged your changes with the master branch.

Best,
Tassilo

@tasso94 tasso94 closed this May 12, 2020
d-molotchko-cap added a commit to CapBPM/camunda-bpm-platform that referenced this pull request Jun 18, 2020
* chore(branding): update camunda-welcome screenshots

related to CAM-11683

* fix(engine): empty properties for filter are not stored as null

* Ensure that an empty Tasklist Filter properties object is always
  stored in the same format in the DB. This is done to ensure that
Oracle DB doesn't store NULL instead of an empty string;
* Clean up FilterEntity;
* Convert related JUnit3 to a JUnit4 test.

Related to CAM-11109,
Closes PR (camunda#819)

* chore(distro): remove PermSize property

the property has been removed from Java 8

Related to CAM-11896

* fix(rest): remove unused error details property

* Remove the unused and unset External Task errorDetails property from the OpenAPI docs.
* Remove the property from the ExternalTaskDto class.

Related to CAM-11774

* chore(engine): improve exception message

related to CAM-11819, PR camunda#787

* chore(spring-boot/webapp): change default application path to /camunda

related to CAM-11373

* fix(run): fix CORS with authentication behavior

* execute CORS filter before authentication filter
* do not forward CORS preflight request to succeding filter
* allow all HTTP methods that are used by Camunda REST API

Related to CAM-11840, CAM-11885

* fix(qa): fix large data tests

- since optimize changed the type of op logs it exports, the test setup
  must be adapted accordingly
- doubles the heap size; in a local H2 setup I could observe the max heap
  size being approached and the garbage collector becoming very busy

related to CAM-11899

* chore(release): Prepare release: set version to 7.13.0-alpha5

* chore(release): Prepare next development version: 7.13.0-SNAPSHOT

* chore(license-book): update for 7.13

related to CAM-11764

* fix(engine): remove distinct from fetch and lock on postgres

- leads to bad query plans as the database cannot push the pagination
  much into the query plan when distinct is present
- must be applied with caution: distinct can only be omitted when we do not
  join another table

related to CAM-11887

* fix(rest-openapi): fix string arrays definitions in query parameters

* OpenAPI supports 'array' type in query parameters and
resolves them to idIn=val1&idIn=val2
* the REST API expects a comma-separated lists idIn=val1,val2

Related to CAM-11934

* chore(release): Prepare release: set version to 7.13.0

* chore(release): Prepare next development version: 7.14.0-SNAPSHOT

* chore(project): separate Spring boot build into assembly and distro

- modules with webapp dependencies should not be built as part of the
  distro profile, because that profile is run in the platform-ASSEMBLY
  build, at which point the webapps have not been built yet
- See the Run and Tomcat distro builds for the same pattern, e.g.
  distro/tomcat/pom.xml builds the Tomcat webapp only in the distro-ce
  profile

related to CAM-11950

* feat(engine/rest): add query criteria to several queries

Extended queries:

* Historic incident
  * incidentMessageLike
  * processDefinitionKey
  * createTimeBefore
  * createTimeAfter
  * endTimeBefore
  * endTimeAfter
  * orderByProcessDefinitionKey
* Runtime incident
  * incidentMessageLike
  * incidentTimestampBefore
  * incidentTimestampAfter
* Historic activity instance
  * activityNameLike

related to CAM-11798
closes camunda#825

* fix(rest): filename uses double quotes in content-disposition header

* According to RFC 2616 (19.5.1 Content-Disposition), the value of the `filename` parameter must be a double-quoted string
* Fixes the problem in Mozilla Firefox that files including containing spaces in filenames can be downloaded correctly

Related to CAM-11925
Closes camunda#834

* fix(jboss): revert distro and distro-ce profile merge

* Revert the merging of the 'distro' and 'distro-ce' profiles since it
  creates a cycle in the Maven modules build hierarchy by requiring the
Webapps during the ASSEMBLY phase (uses the 'distro' profile), which breaks the build.

Related to CAM-11950

* feat(rest-openapi): add user endpoints

Related to CAM-11527
Closes PR (camunda#818)

* chore(release): add 7.14 upgrade scripts & adjust create scripts


Closes camunda#843
Related to CAM-11980

* chore(release): add camunda-qa-upgrade-test-fixture-714


Closes camunda#842
Related to CAM-11979

* chore(release): update camunda.version.old prop

* chore(release): update camunda versions in qa projects

* update old camunda version in /database
* update old camunda version in /qa/test-db-rolling-update/create-new-engine
* update old camunda version in /qa/test-db-upgrade
* update old camunda version in /qa-db-test-old-engine
* update camunda version in /qa/test-db-rolling-update/create-old-engine
* update camunda version in /qa/test-db-rolling-update/rolling-update-util
* update camunda version in /qa/test-db-rolling-update/test-old-engine

Closes camunda#841
Related to CAM-11978

* chore(pom): introduce distro-starter profile

- used in release jobs to build the enterprise artifacts

Related to CAM-11950

* fix(pom): fix distro-starter profile module

Related to CAM-11950

* chore(pom): introduce distro-starter profile

- used in release jobs to build the enterprise artifacts

Related to CAM-11950

* fix(starter): fix distro-starter profile scope

Related to CAM-11950

* chore(invoice): update DMN to 1.3 standard

related to CAM-11915

* chore(starter): add distro-starter profile to qa

Related to CAM-11950

* chore(starter): add distro-starter profile to qa

Related to CAM-11950

* fix(starter): fix distro-starter profile module

Related to CAM-11950

* chore(brand): update favicon with new brand colors

related to CAM-11949

* chore(db): make all assignee column sizes consistent

Related to CAM-11779

* fix(spring-boot): respect app path in csrf prevention filter

related to CAM-11993

* chore(sql): add hint to consider auth checks in webapps as well

related to CAM-11954

* chore(rest-openapi): add User global tag 

Related to CAM-11527

* chore(deps): update tomcat to 9.0.35

related to CAM-12017

* chore(deps): update tomcat to 9.0.36

related to CAM-12017

* chore(deps): update spring boot to 2.2.8

Related to CAM-12016
Closes camunda#856

* fix(engine): ensure correct sql exception logs 

Related to CAM-11761
Closes PR (camunda#846)

* fix(dmn): date conversion issue in multithreading mode (camunda#827)

* The SimpleDateFormat class, used in the DateDataTypeTransformer is not thread-safe and causes the DMN Engine to behave incorrectly in a multi-threaded environment.

Related to CAM-11897

* chore(engine): allow update of calledProcessInstanceId

* in historic activity instances, the calledProcessInstanceId can be
  updated in case the new value is not null
* enables custom behavior of the call activity, e.g. by calling a service
  first and a process only upon a failing service by retrying the call activity
* add a test for calledProcessInstanceId with wait state in called process

related to CAM-12030

* chore(spring-boot): make hsts header configurable

related to CAM-11602

* chore(distro/webapp): add commented hsts header section

related to CAM-11602

* feat(rest/open-api): add historic activity instance endpoints

Related to CAM-11555
Closes camunda#854

* chore(dmn): bump feel scala and add test coverage

* Add test coverage for the bug fix in the feel-scala#110 issue.

Related to CAM-11304

* chore(dmn): add test coverage for feel-scala bugfix

* Add test coverage for the bug fix in the feel-scala#90 issue.

Related to CAM-11382

Co-authored-by: Martin Stamm <martin.stamm@camunda.com>
Co-authored-by: Nikola Koevski <nikola.koevski@camunda.com>
Co-authored-by: yanavasileva <yanavasileva@users.noreply.github.com>
Co-authored-by: David Hodges <david.hodges@ecogyenergy.com>
Co-authored-by: Tassilo Weidner <tassilo.weidner@camunda.com>
Co-authored-by: Miklas Boskamp <miklas.boskamp@camunda.com>
Co-authored-by: Thorben Lindhauer <thorben.lindhauer@camunda.com>
Co-authored-by: camunda-jenkins <ci_automation@camunda.com>
Co-authored-by: Yana Vasileva <yana.vasileva@camunda.com>
Co-authored-by: Andrey Osipkov <osipkov_a@mail.ru>
Co-authored-by: Juan C Calderon <juan.calderon@borealixsec.com>
Co-authored-by: Emma Emma Emma <emma.pollum@camunda.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants