-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Using console.error()
for Query Failures causes red screen of death on React Native
#366
Comments
We should probably change this to |
When I originally decided on That said, I have not had sufficient experience iterating on a product and its error states. I would be fine with changing this to use |
The specific use case, if it helps, is the first screen in my app. My graphql endpoint is authenticated, and so when the app first loads (because this first screen is a RelayContainer), the request fails. This is ok - i want to show data on this screen AFTER the user has tapped the 'login w/ Facebook' button. |
Ahh... okay. We should definitely change that to use |
Since React Native shows a big red box for `console.error` it can get in the way of development when working on error handling. Fixes facebook#366.
a0d80d5
This commit changed to using
console.error()
to report query failures. In a browser, hidden away in dev tools, this doesn't really matter. On React Native however, in development specifically, usingconsole.error()
rather thanconsole.log()
causes a red screen of death. This seems like incorrect behavior for relay, as it prevents the developer from handling query errors (such as an unavailable server) gracefully.The text was updated successfully, but these errors were encountered: