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

Convert graphql-java validation errors to TypedGraphQL error #1905

Merged
merged 7 commits into from
May 9, 2024

Conversation

srinivasankavitha
Copy link
Contributor

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Changes in this PR

This makes the error consistent with our other error handling in the DGS framework where we emit TypedGraphQlErrors. Previously, we were emitting the validation error from graphql-java directly.

} else if (error.errorType == graphql.ErrorType.OperationNotSupported) {
val graphqlErrorBuilder = TypedGraphQLError
.newBuilder()
.errorType(ErrorType.UNAVAILABLE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

unavailable is like 503 right, maybe this is more of a bad request?

@srinivasankavitha srinivasankavitha merged commit c3e01f7 into master May 9, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants