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 JsonParseException in the gateway as errors #9933

Closed
remcowesterhoud opened this issue Aug 1, 2022 · 0 comments · Fixed by #9934
Closed

Don't log JsonParseException in the gateway as errors #9933

remcowesterhoud opened this issue Aug 1, 2022 · 0 comments · Fixed by #9934
Assignees
Labels
kind/bug Categorizes an issue or PR as a bug version:1.3.14 Marks an issue as being completely or in parts released in 1.3.14 version:8.1.0-alpha5 Marks an issue as being completely or in parts released in 8.1.0-alpha5 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0

Comments

@remcowesterhoud
Copy link
Contributor

Describe the bug

When a user sends a request containing variables (e.g. complete job) and these variables cannot be converted to MsgPack a JsonParseException. Currently these exceptions are logged with an error level by the gateway. This is unexpected, as the fault here lies with the user, who sends the wrong variables. We should add an exception to the GrpcErrorMapper#mapErrorToStatus method so we don't go into the default error logging flow.

To Reproduce

  1. Create a process with a service task
  2. Complete the job with invalid variables: {"test":123
  3. Watch as the gateway logs an error

Expected behavior

No errors should be logged

Log/Stacktrace

Full Stacktrace

<STACKTRACE>

Environment:

  • OS: Cloud
  • Zeebe Version: 8.0.4
@remcowesterhoud remcowesterhoud added the kind/bug Categorizes an issue or PR as a bug label Aug 1, 2022
@remcowesterhoud remcowesterhoud self-assigned this Aug 1, 2022
zeebe-bors-camunda bot added a commit that referenced this issue 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 issue 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 issue 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
@Zelldon Zelldon added the version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0 label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes an issue or PR as a bug version:1.3.14 Marks an issue as being completely or in parts released in 1.3.14 version:8.1.0-alpha5 Marks an issue as being completely or in parts released in 8.1.0-alpha5 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants