Skip to content

Return GraphQL-formatted errors for upstream proxy failures #59

Description

@coderabbitai

Summary

Handle upstream fetch failures in the GraphQL proxy and return the existing client-readable GraphQL error shape.

Required changes

  • Wrap the upstream fetch(apiUrl, ...) call in error handling.
  • Return { errors: [...] } JSON with HTTP status 502 when the upstream request throws.

Affected areas

  • api/graphql.ts

Acceptance criteria

  • Network, DNS, and timeout failures do not produce an opaque platform 500 response.
  • The response has HTTP status 502 and the expected JSON errors shape.
  • The client error path can render the failure.

Source

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions