Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Errors not populating correctly

Aperta
#75 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
graphql, ruby
Ambito
api, backend

Direzione di ricerca

Inizia tracciando il modo in cui gli errori della risposta vengono normalizzati in GraphQL::Client::Errors, quindi esamina il controllo dell’AST per verificare gli errori menzionati nel report. Riproduci la risposta mostrata nell’issue e verifica che l’errore GraphQL restituito popoli l’oggetto errors invece di lasciare vuoti i relativi messages e details.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Ruby
Stelle
78
Fork
228
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github-community-projects/graphql-client

Tutte le issue di github-community-projects/graphql-client

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.