apollo-link icon indicating copy to clipboard operation
apollo-link copied to clipboard

Using onError function and still error appears in console

Open samuelhgf opened this issue 4 years ago • 1 comments

Expected Behavior

All errors should pass through the function and then decide what to do with it

Actual Behavior All errors is passing through the function but is still showing in the console without calling the console.log function

A simple reproduction Implement the onError function on ApolloClient and generate an error watching the console

samuelhgf avatar Jan 28 '20 17:01 samuelhgf

Most probably error is logged in the next link you're using in your ApolloClient setup. If you want to skip logging, you should nullify response.errors https://www.apollographql.com/docs/react/v3.0-beta/data/error-handling/#ignoring-errors

LexSwed avatar Jan 29 '20 12:01 LexSwed