Skip to content

fix: preserve null data in mock error responses - #2187

Merged
lbroudoux merged 1 commit into
microcks:masterfrom
Nachiket-Roy:fix-graphql-mock-error-response
Jun 30, 2026
Merged

lbroudoux merged 1 commit into
microcks:masterfrom
Nachiket-Roy:fix-graphql-mock-error-response

Conversation

@Nachiket-Roy

Copy link
Copy Markdown
Contributor

Description

  • Handle GraphQL mock responses with null or missing data fields without failing.
  • Preserve GraphQL error payloads when aggregating mock responses.
  • Add integration tests for GraphQL error response scenarios.

Related issue

Fixes #2176

@github-actions

Copy link
Copy Markdown

👋 @Nachiket-Roy

Welcome to the Microcks community! 💖

Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.

Hope you have a great time there!

@Nachiket-Roy
Nachiket-Roy marked this pull request as draft June 25, 2026 19:05
@lbroudoux

Copy link
Copy Markdown
Member

It looks like the build is broken with tests failing => https://github.com/microcks/microcks/actions/runs/28181410001/job/83479399948?pr=2187#step:5:2004
Would you mind looking at it? Also, remove the Draft status when ready.

@Nachiket-Roy
Nachiket-Roy marked this pull request as ready for review June 26, 2026 13:31
@Nachiket-Roy

Copy link
Copy Markdown
Contributor Author

@lbroudoux Should be fixed now, PTAL

@lbroudoux

lbroudoux commented Jun 26, 2026 •

Copy link
Copy Markdown
Member

Sorry but we still have failing integration tests here: https://github.com/microcks/microcks/actions/runs/28241308985/job/83683523044#step:5:1979

Be sure to have them pass locally using mvn clean -it test in the /webapp folder.

@Nachiket-Roy
Nachiket-Roy force-pushed the fix-graphql-mock-error-response branch from 47fbc22 to 3dd725a Compare June 26, 2026 18:57
@Nachiket-Roy

Copy link
Copy Markdown
Contributor Author

@lbroudoux I ran the webapp module tests locally and all 420 tests pass.
While looking into the build, I also noticed a ~30s hang during CI shutdown. It comes from the gRPC server's lifecycle: the shutdown hook calls grpcServer.shutdown() but never releases the CountDownLatch the await thread is parked on, so Surefire's exit-timeout ends up being the only thing that actually terminates it.
This is unrelated to this PR, but if it's worth fixing I'm happy to open a separate PR.

@lbroudoux

Copy link
Copy Markdown
Member

Surefire's exit-timeout ends up being the only thing that actually terminates it.
This is unrelated to this PR, but if it's worth fixing I'm happy to open a separate PR.

Oh yes, that's a good catch. Please do submit another PR for this.

@lbroudoux lbroudoux left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks all good to me. Thank you @Nachiket-Roy !

@lbroudoux
lbroudoux merged commit 9d2263c into microcks:master Jun 30, 2026
12 checks passed
@github-actions

Copy link
Copy Markdown

🎉 @Nachiket-Roy

You are now a Microcks community contributor! 💖

Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏

📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.

If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌"

Kudos and please keep going, we need you 🙌

@Nachiket-Roy
Nachiket-Roy deleted the fix-graphql-mock-error-response branch June 30, 2026 13:23
lbroudoux pushed a commit that referenced this pull request Aug 5, 2026
…egration tests (#2187)

Signed-off-by: Nachiket Roy <[email protected]>
(cherry picked from commit 9d2263c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphQL mock returns HTTP 500 "Exception while filtering response JSON" for error responses (data: null); no support for the GraphQL errors array

2 participants