Open eddieysong opened 6 years ago
maybe you can try the error from the component props and see what information it has
Looks like Apollo 2.0 did this a better way: https://www.apollographql.com/docs/react/features/error-handling.html
Though we can try this: https://www.npmjs.com/package/apollo-errors
or we can prettify the error message on server and just display it from the UI.
That's the way I'm planning to do it; I'm no longer under the illusion that this app will ever go to production
H A H A
yields
But in the React component's handleClick method
yields
The error no longer contains useful information like
code: 'ER_DUP_ENTRY',
that we can use to handle errors gracefully.