This repository has been archived by the owner on Dec 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running into this issue: apollographql/apollo-client#3236
# Conflicts: # src/@ui/forms/ContributionForm/index.js
@burkeshartsis I'm going to go ahead and use admin privs to merge this so I can get a build out. I tested it a bunch, and while I don't think it catches every network error, it sure does catch most of the problems. Fixed the audio issue too. Feel free to look at this after the fact, but PLEASE enjoy your 👶 time!! |
9 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should prevent crashes from occurring due to network errors.
This was a HUGE doozy to figure out. Apollo does this interesting thing where if you don't "access"
data.error
in your component, it throws an error. Like...And if you don't do that, you get a RSOD / crash as an error is thrown. This seems sensible, although in our case, errors were being thrown even though we had a global error handler setup (apollo-link-error). After reading this thread - apollographql/react-apollo#604 (comment) it seems this behavior can be inconsistent and I tried all 5 solutions offered in that comment.
In the end, we needed a combination of making sure our HOCs were passing down
error
objects, updating theapollo-link-error
syntax, and some selective rendering of an error message.This PR can be tested by loading the app up, going to a few screens, then turning on airplane mode. For example - open the app, turn on airplane, then navigate to search. This triggers a crash on current app. Same with profile, giving, etc.
Creator
Reviewer
test
and make sure all tests pass