-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for ServerError obscured by ServerParseError #9997
Fix for ServerError obscured by ServerParseError #9997
Conversation
@dillontiner: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
@dillontiner Thanks for follow up on this and our apologies for the lingering PR review, we'll check this out soon. 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM but I'm going to ask another person on the team to give this a quick check. cc @hwillson @alessbell @MrDoomBringer @benjamn
Once merged we can close out:
This seems to be failing the NPM Bundle Size check |
0c15e48
to
f22ae68
Compare
…cause it fails to parse json bodyText before handling the error code
bd60ff6
to
9f79914
Compare
LGTM. I went ahead and added some extra tests - we're now testing unparsable JSON with both 200 and 400 server response codes. Other than that, I'm glad to get this merged! Thanks a ton @TakahiroHimi for the original PR and @dillontiner for keeping the fix alive. All the best, |
Fixes #8945 where not handling the response status code before parsing the response body text causes the apollo client to send a ServerParseError when it should send a ServerError.
The changes here are taken from #8974 which has been inactive for months