Skip to content

fix(graphqlTS): surface real error detail instead of a generic schema error - #198

Open
naman-contentstack wants to merge 2 commits into
developmentfrom
fix/DX-10294
Open

fix(graphqlTS): surface real error detail instead of a generic schema error#198
naman-contentstack wants to merge 2 commits into
developmentfrom
fix/DX-10294

Conversation

@naman-contentstack

Copy link
Copy Markdown
Contributor

Summary

  • Non-schema GraphQL failures (plain HTTP errors, top-level GraphQL errors, REST-style error_message bodies) were collapsing into the generic GRAPHQL_SCHEMA_ERROR, leaving callers with nothing to diagnose.
  • Falls back through the other known error shapes, then to the HTTP status and request URL, so a failure always surfaces something actionable.

Test plan

  • NODE_OPTIONS=--experimental-vm-modules npx jest tests/unit/graphqlTS — 10/10 passing, including 3 new regression tests
  • Verified error-message fallback chain against 403 HTML body, top-level GraphQL error, and REST error_message body shapes

Jira: DX-10294

🤖 Generated with Claude Code

… error

Non-schema GraphQL failures (plain HTTP errors, top-level GraphQL
errors, REST-style error_message bodies) were collapsing into the
generic GRAPHQL_SCHEMA_ERROR because only one specific error shape was
checked. Fall back through the other known shapes, then to the HTTP
status and request URL, so callers get something to diagnose.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@naman-contentstack
naman-contentstack requested a review from a team as a code owner August 24, 2026 11:42
@snyk-io

snyk-io Bot commented Aug 24, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.

1 participant