-
Notifications
You must be signed in to change notification settings - Fork 295
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
Handling Serialization Errors #1970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue coercing errors (which the original issue is about) are client errors (not internal server errors).
Hi @Meemaw,
I checked the
{
"errors": [
{
"message": "Validation error (WrongType@[ip]) : argument 'domain' with value 'StringValue{value='google'}' is not a valid 'Domain' - Invalid domain name",
"locations": [
{
"line": 11,
"column": 6
}
],
"path": [
"ip"
],
"extensions": {
"classification": "ValidationError",
"errorType": "BAD_REQUEST",
"errorDetail": "INVALID_ARGUMENT"
}
}
]
} This is not an The Please let me know you are referring to which scenario about coercing errors being client errors and I could test for it and handle it appropriately. |
IMO in summary, |
@paulbakker @Emily @kilink @srinivasankavitha could one of you please review this PR? |
Thanks for the fix! PR changes look good to me. |
graphql-dgs/src/test/kotlin/com/netflix/graphql/dgs/GraphQLJavaErrorInstrumentationTest.kt
Outdated
Show resolved
Hide resolved
Hi @srinivasankavitha, could you please tell me why the build associated with this PR is failing? Do I need to take any action to fix the build? |
@mrvaruntandon it looks like it's failing due to ktlint errors, you can run |
@kilink, thank you for your guidance! I have fixed the lint issue, could you please trigger the build again and merge this PR if successful? |
Thank you @srinivasankavitha @kilink @Meemaw for your support. This was my first open source contribution. |
Pull request checklist
first
Pull Request type
Changes in this PR
TypedGraphQLError
is being formed inGraphQLJavaErrorInstrumentation
Describe the new behavior from this PR, and why it's needed
This PR resolves #1914
Alternatives considered
Describe alternative implementation you have considered