Parse 502 status code response as a GraphQL response. #38
Labels
enhancement
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
As reported by @cjwagner in shurcooL/graphql#29 (comment) and recently reproduced by me, GitHub GraphQL API v4 can return a response with status code 502 that includes a valid GraphQL response:
(I'm a little surprised and concerned that
data
field is a string"null"
rather than a JSONnull
value. It's still valid JSON, but... According to GraphQL spec, "If an error was encountered during the execution that prevented a valid response, the data entry in the response should benull
.")We can parse it as such, instead of returning a generic "non-200 OK status code" error:
This may depend on shurcooL/graphql#5 being resolved, or maybe there's a shorter path to getting this done.
The text was updated successfully, but these errors were encountered: