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

Don't log JsonParseExceptions as errors #9934

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

remcowesterhoud
Copy link
Contributor

@remcowesterhoud remcowesterhoud commented Aug 1, 2022

Description

JsonParseExceptions get thrown when a user passes variables in their request which cannot be converted to message pack. Currently these are being logged as errors. Since this a fault by the user we should log these as debug.

closes #9933

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Please refer to our review guidelines.

JsonParseExceptions get thrown when a user passes variables in their request which cannot be converted to message pack. Currently these are being logged as errors. Since this a fault by the user we should log these as debug.
@remcowesterhoud remcowesterhoud force-pushed the 9933_jsonparsexception_error_log branch from 5668c9d to c6dfa7d Compare August 1, 2022 09:59
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2022

Test Results

   797 files  ±0         1 errors  796 suites  ±0   1h 34m 52s ⏱️ +30s
6 078 tests +9  6 069 ✔️ +9  9 💤 ±0  0 ±0 
6 264 runs  +9  6 255 ✔️ +9  9 💤 ±0  0 ±0 

For more details on these parsing errors, see this check.

Results for commit c6dfa7d. ± Comparison against base commit f02eebf.

@korthout
Copy link
Member

korthout commented Aug 1, 2022

@remcowesterhoud Can you check whether this also resolves? I guess not, but might be worth to check.

Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! LGTM 👍

@remcowesterhoud
Copy link
Contributor Author

remcowesterhoud commented Aug 2, 2022

@remcowesterhoud Can you check whether this also resolves? I guess not, but might be worth to check.

#9832

It won't. This only resolves it for JsonParseExceptions. In your case a RunTimeException is thrown, caused by an IllegalArgumentException. We could make a similar change for these exceptions.

@remcowesterhoud
Copy link
Contributor Author

bors merge

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit 101750b into main Aug 2, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the 9933_jsonparsexception_error_log branch August 2, 2022 09:02
@backport-action
Copy link
Collaborator

Successfully created backport PR #9950 for stable/1.3.

@backport-action
Copy link
Collaborator

Successfully created backport PR #9951 for stable/8.0.

zeebe-bors-camunda bot added a commit that referenced this pull request Aug 2, 2022
9950: [Backport stable/1.3] Don't log JsonParseExceptions as errors r=remcowesterhoud a=backport-action

# Description
Backport of #9934 to `stable/1.3`.

relates to #9933

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
zeebe-bors-camunda bot added a commit that referenced this pull request Aug 2, 2022
9951: [Backport stable/8.0] Don't log JsonParseExceptions as errors r=remcowesterhoud a=backport-action

# Description
Backport of #9934 to `stable/8.0`.

relates to #9933

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
zeebe-bors-camunda bot added a commit that referenced this pull request Aug 2, 2022
9950: [Backport stable/1.3] Don't log JsonParseExceptions as errors r=remcowesterhoud a=backport-action

# Description
Backport of #9934 to `stable/1.3`.

relates to #9933

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@saig0 saig0 added release/8.0.8 version:1.3.14 Marks an issue as being completely or in parts released in 1.3.14 labels Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:1.3.14 Marks an issue as being completely or in parts released in 1.3.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't log JsonParseException in the gateway as errors
4 participants