Errors not populating correctly
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing how the response's errors are normalized into GraphQL::Client::Errors, then inspect the AST check for errors mentioned in the report. Reproduce the response shown in the issue and verify that the returned GraphQL error populates the errors object rather than leaving its messages and details empty.
Written by the indexing model from the issue text.
Description
Given this response
#<GraphQL::Client::Response:0x000071fb2142c000
@data=#<#<Module:0x000071fb20ea5820>::Mutation addUser=nil>,
@errors=#<GraphQL::Client::Errors @messages={} @details={}>,
@extensions=nil,
@full_response=
{"connection" => ["close"],
"server" => ["TwistedWeb/24.3.0"],
"date" => ["Wed, 18 Jun 2025 12:45:29 GMT"],
"content-type" => ["application/json"],
"content-length" => ["338"]},
@original_hash=
{"data" => {"addUser" => nil},
"errors" =>
[{"message" => "The provided field is not unique and already exists in GUS.",
"locations" => [{"line" => 2, "column" => 3}],
"path" => ["addUser"],
"errorType" => "FieldExistsError",
"data" => nil,
"errorInfo" => {"errorType" => "FieldExistsError", "field" => "userPrincipalName", "value" => "[email protected]"}}]}>
The errors object is empty even though there is an error returned. I tried stepping through I was able to get the errors object after being normalized which yielded
{"message" => "The provided field is not unique and already exists in GUS.",
"locations" => [{"line" => 2, "column" => 3}],
"path" => ["addUser"],
"errorType" => "FieldExistsError",
"data" => nil,
"errorInfo" => {"errorType" => "FieldExistsError", "field" => "userPrincipalName", "value" => "[email protected]"},
"normalizedPath" => ["data", "addUser"]}
I'm assuming it's part of the AST check for errors but I don't really get how it works or what's missing
- Dominant language
- Ruby
- Stars
- 79
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github-community-projects/graphql-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
github-community-projects/graphql-client#78 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
github-community-projects/graphql-client#77 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
github-community-projects/graphql-client#76 · 4 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
github-community-projects/graphql-client#67 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
github-community-projects/graphql-client#65 · 1 comment ·
All issues in github-community-projects/graphql-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenAPITools/openapi-generator#25768 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
olivierlacan/trebuche#8 ·
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 84/100
AllYourBot/hostedgpt#929 ·
Maintainers usually reply within 1 day
-
Error toast on about page when domain blocks missingPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
sentry-rails: excluded_exceptions triggers a Rails deprecation warning for ActionController::InvalidAuthenticityTokenPossibly taken A pull request linked to this issue is open or already merged. OpenBug Ruby Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-ruby#3228 · 1 comment ·
Maintainers usually reply within 1 day