Return readable error back to client#7
Conversation
|
@farzd: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
|
@farzd Preferably the error is also formatted properly. Any feedback to getting this merged? |
|
@julienvincent yeah cool, don't mind updating it but not sure if anyones maintaining this? |
|
Agreed it does seem a bit stale. But it is on the Apollo org so someone will probably get around to looking at this PR eventually. Assuming it does get merged, it might be nice to namespace the errors to follow the GraphQL response convention: JSON.stringify({
errors: error
}, null, 2)Then again, subscriptions don't return events in a |
Currently if theres an error its returning [Object object] back to the client, this would return stingified error. e.g
[{"message":"Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory."}]I'm sure where else utilises this error though 👎