apollo-link
apollo-link copied to clipboard
Apollo link error modify error returned in components
Is there anyway for me to modify the shape of the errors which are passed to my components using apollo-link-error?
I tried manually setting the response.error object but didn't have any luck.
Is this possible?
Same issue here. I want to wrap the error object into an Error instance before forwarding (just like Afterware (data manipulation)) to the component but it doesn't work.
return forward(operation).map((response) => {
if (response.errors) {
response.data = new BaseError(graphQLErrors);
}
return response;
});