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

MagentoGraphqlClient logs long stacktraces on error #1010

Open
MatPiw opened this issue Jun 11, 2024 · 0 comments
Open

MagentoGraphqlClient logs long stacktraces on error #1010

MatPiw opened this issue Jun 11, 2024 · 0 comments

Comments

@MatPiw
Copy link

MatPiw commented Jun 11, 2024

Expected Behaviour

When GraphQL query results in an error, as a developer I am able to handle and log the error according to my needs.

Actual Behaviour

When GraphQL query results in an error, the stack trace is always logged, before I am able to handle it.
The stacktraces can be very long. This makes finding actual issues harder and log file increases in size dramatically.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Set up commerce endpoint on AEM
  2. Make the request that ends up in error (e.g. 500) via MagentoGraphqlClient
  3. Observe the logs

Platform and Version

  • core-cif-components version 2.12.0
  • AEMaaCS (also reproducible locally)

Sample Code that illustrates the problem

https://github.com/adobe/aem-core-cif-components/blob/master/bundles/core/src/main/java/com/adobe/cq/commerce/core/components/internal/client/MagentoGraphqlClientImpl.java#L281

Logs taken while reproducing problem

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

No branches or pull requests

1 participant