Skip to content

Pin down how query answers a path-scoped GitHub error - #668

Open
Thayorns wants to merge 2 commits into
zerocracy:masterfrom
Thayorns:655
Open

Pin down how query answers a path-scoped GitHub error#668
Thayorns wants to merge 2 commits into
zerocracy:masterfrom
Thayorns:655

Conversation

@Thayorns

@Thayorns Thayorns commented Sep 2, 2026

Copy link
Copy Markdown

graphql-client stamps a not-found error like path: ["repository"] as normalizedPath: ["data", "repository"] once data itself is non-null, and result.errors only surfaces errors whose normalized path has no extra segment. That is what this issue was about, and #672 has since fixed it on master: query now folds result.data.errors into the same message list, so a renamed or deleted repository raises Fbe::Error instead of returning a stray nil.

Since the production fix already landed, this branch keeps only what was missing around it. Three tests now pin the behavior down: a path-scoped error arriving together with partial data still raises rather than handing the caller a half-filled result, a top-level error is not swallowed when a path-scoped one sits beside it, and a null data with no errors at all is left alone instead of blowing up on data.errors.

Closes #655

@Thayorns

Thayorns commented Sep 2, 2026

Copy link
Copy Markdown
Author

@yegor256 happy to clarify anything about this fix if needed.

yegor256 commented Sep 3, 2026

Copy link
Copy Markdown
Member

This looks like a near-duplicate fix of the same result.data.errors gap already merged via #672 — please check whether it's still needed. Assigning to @yegor256.


Generated by Claude Code

@yegor256
yegor256 self-requested a review September 3, 2026 06:22
@Thayorns Thayorns changed the title Raise on GitHub error dropped by empty result.errors Pin down how query answers a path-scoped GitHub error Sep 3, 2026
@Thayorns

Thayorns commented Sep 3, 2026

Copy link
Copy Markdown
Author

@yegor256 take a look please

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.

Fbe::Graph#query never raises on GitHub not-found errors in lib/fbe/github_graph.rb

2 participants