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
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
Summary
Handle upstream
fetchfailures in the GraphQL proxy and return the existing client-readable GraphQL error shape.Required changes
fetch(apiUrl, ...)call in error handling.{ errors: [...] }JSON with HTTP status 502 when the upstream request throws.Affected areas
api/graphql.tsAcceptance criteria
errorsshape.Source