Example:
const customLink = new ApolloLink((operation, forward) => {
throw new UnAuthorizedError()
return forward(operation);
});
const client = new ApolloClient({
link:ApolloLink.from([
customLink,
...,
createSubscriptionHandshakeLink({ url, region, auth }, httpLink)
])
cache: new InMemoryCache()
});
In the above example, the custom error handling customLink throws an Error before forward(operation). Is there a way to capture that custom error?