Skip to content

[spring-server] fix: Exclude stacktraces when null values are specified for non-null parameters #426

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

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

tk26
Copy link
Contributor

@tk26 tk26 commented Oct 13, 2019

📝 Description
Refer #423 (comment) for the cause
The fix includes setting stackTrace to an empty array when the error type is a ValidationError and a NonNullableValueCoercedAsNullException was thrown

🔗 Related Issues
Resolves #423

@codecov-io
Copy link

codecov-io commented Oct 13, 2019

Codecov Report

Merging #426 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #426      +/-   ##
============================================
+ Coverage      97.8%   97.81%   +0.01%     
  Complexity      325      325              
============================================
  Files           105      105              
  Lines          1230     1236       +6     
  Branches        202      204       +2     
============================================
+ Hits           1203     1209       +6     
  Misses            7        7              
  Partials         20       20
Impacted Files Coverage Δ Complexity Δ
...pediagroup/graphql/spring/model/GraphQLResponse.kt 100% <100%> (ø) 4 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6e5718...950bb43. Read the comment docs.

Copy link
Contributor

@smyrick smyrick left a comment

Choose a reason for hiding this comment

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

Can we add unit tests to verify the new behaviour? This should be relatively easy since this is an extension function

Copy link
Contributor

@smyrick smyrick left a comment

Choose a reason for hiding this comment

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

Actually can we add one more test case for the default behavior

@tk26
Copy link
Contributor Author

tk26 commented Oct 16, 2019

Actually can we add one more test case for the default behavior

@smyrick I think we do have one already for the default behavior - https://github.com/ExpediaGroup/graphql-kotlin/blob/master/graphql-kotlin-spring-server/src/test/kotlin/com/expediagroup/graphql/spring/model/GraphQLResponseKtTest.kt#L75

@smyrick smyrick added changes: patch Changes require a patch version type: bug Something isn't working labels Oct 16, 2019
@smyrick smyrick merged commit f0b3590 into ExpediaGroup:master Oct 16, 2019
@tk26 tk26 deleted the exclude-stacktraces branch October 16, 2019 20:41
dariuszkuc pushed a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: patch Changes require a patch version type: bug Something isn't working
Development

Successfully merging this pull request may close these issues.

graphql-kotlin-spring-server includes stacktraces in validation errors
4 participants