-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Several error reporting issues #434
Comments
@dahjelle is this example something we can clone and run locally? |
I put it in this GitHub repo. Should be fairly straightforward to get it going (but, then again, it's the stack I'm used to :-) ). |
Nice, I dig the mocked network interface! This could be a great way to distribute simple examples :] |
I was pretty pumped when I realized you'd set things up to enable mocking a whole GraphQL server. 👍 |
That's how we run all of the apollo client tests! https://github.com/apollostack/apollo-client/blob/master/test/mocks/mockNetworkInterface.ts |
I think (1) may be tied to one of the current issues with |
As far as I can tell, it seems that both (1) and (3) are related to I did fix (2) and submitted #445. However, the stack trace added will contain a reference to the |
I think there may be several issues here; this is prompted from a discussion with @Poincare in Slack These may be separate issues; let me know if you'd prefer separate open issues for each.
Issues
render
error reported as anetworkError
ApolloError
object does not include stack tracescrashReporter
fromstore.ts
not included inclient.middleware()
Background
I'm using
react-apollo
andapollo-client
with an existing Redux store, and had a situation where a Component (hooked up usingconnect
) was throwing an error because I was trying to access a property ofundefined
(See line 39 below.) While this is a reduced example, trying to track down the actual error in my app was fairly difficult.1)
render
errorThe code below will report the 'cannot read property' error as a
networkError
(!) property of the ApolloError object, even though the error is in arender
method. I'm not sure why that would be.2) No stack trace on
ApolloError
The ApolloError object itself doesn't have a stack trace—I have to go into the
networkError
property directly to access it.3)
crashReporter
While trying to create the reduced test case below, I noticed that if I let Apollo manage the Redux store, I got a separate error message with the proper stack trace, from this line. This doesn't happen if you are using an existing Redux store.
Code
There is currently an example at http://apolloerror-example.dahjelle.c9users.io/, but I have no idea how long c9.io will let it run. :-)
The text was updated successfully, but these errors were encountered: