-
Notifications
You must be signed in to change notification settings - Fork 344
apollo-link-error not able to ignore errors #194
Comments
@bogdansoare what type of error is being thrown? If it is a client side error (before the request is sent), there won't be a response to modify. |
@jbaxleyiii it is thrown from the graphql backend, from a signin mutation when a user tries to sign in with the wrong credentials. |
I have the exact same issue with my app. The signIn mutation should not throw an error when a 401 is returned. I guess it is due to the fact, that we are trying do deal with a networkError which does not include a response object. See here: https://github.com/apollographql/apollo-link/blob/master/packages/apollo-link-error/src/index.ts#L29 But how are we supposed to ignore specific network errors? |
Ok, now that I did a bit more research, my whole setup might be bad. GraphQL is transport layer agnostic and status codes are http specific. I guess we should return an error and ignore it the way it is documented. I will give that a try. |
Hello there! I have the same issue and now I use this workaround to suppress special errors:
But it's just hacked version of: https://github.com/apollographql/apollo-link/blob/master/packages/apollo-link-error/src/index.ts#L24-L58 |
I'm also experiencing this issue. Except to test i'm causing the graphql server to not be online and it's hitting both the onError Handler and the .catch on the query. I expect it to not error like that. |
I think this is still an issue? This also shows itself if you have a server that doesn't respond with a response object (as @namxam pointed out). Unless there's something I'm missing, it's not possible to catch that error anywhere, right? |
This is still a quite frustrating issue |
Any update on this guys ? |
Hello.
When I try to ignore errors with the error link by using
response.errors = null
I get this error messageThe text was updated successfully, but these errors were encountered: