-
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
onError link not working for HTTP multipart subscriptions #12258
Comments
Could you please also show the |
Sure. httpLink is a simple URL that points to our local Apollo router. const httpLink = new HttpLink({
uri: "http://localhost:4000/graphql"
}); We are trying to catch errors to automatically handle re-authentication when the token expires. Please note that there is another custom link to inject the token header, which I have skipped for now. Currently, I am testing with the errorLink and httpLink to check error handling. |
@ssmilin I believe what you're seeing are protocol errors which are fatal transport-level errors in multipart subscriptions. See this section in the docs that mention the top-level See this test as well which looks like the exact error/format you're seeing: apollo-client/src/__tests__/graphqlSubscriptions.ts Lines 459 to 506 in cda321c
To be honest, I don't remember the reason we bury that error in a symbol which is not accessible in the |
Hey @ssmilin 👋 @phryneas and I talked about this and we think that making these errors available in I can't guarantee a time-frame on the fix but we'll try to get to it when we can. Thanks for raising the issue! |
onError link is not invoked when an error occurs during an HTTP multipart subscription. It successfully checks the error response from the 'query' operation but fails to do the same for the 'subscription' operation.
Subscription Response:
Client:
The text was updated successfully, but these errors were encountered: