Skip to content

Bug: GraphQLIndexer.query ignores GraphQL-level errors in an HTTP 200 response #515

Description

@Jaydbrown

src/indexer.ts:81-85query() checks only response.ok (HTTP status), then returns await response.json().

GraphQL servers return HTTP 200 with { "data": null, "errors": [ ... ] } for query-level failures (bad field, resolver throw, validation error). query() resolves successfully and hands the caller { data: null, errors: [...] }.

Impact

Every caller must know to inspect .errors themselves; nothing in the SDK surface signals it. A failed query looks identical to a successful one that returned no rows.

Suggested fix

After parsing, if body.errors is a non-empty array, throw a ConduitError carrying the messages; otherwise return body.data.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingpriority: mediumMissing feature or UX issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions