Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use only the Node.js JSON cycles error.
Node.js only raises this particular error when cycles are detected. While I first thought it was more defensive to catch the exact error we anticipated, I'm slightly reconsidering whether this is defensive enough and if we should, in fact, change this back to catching any error, particularly since this runs async and might go undetected or cause a whole string of a user's errors to not pass any variables. Thoughts, @glasser?
- Loading branch information
4b2f9d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No ultra strong feelings. Note that I think this actually is run synchronously, but for some reason errors thrown by extension stack requestDidStart are console.error'd (in GraphQLExtensionStack.handleDidStart) and otherwise ignored. (Whereas the plugin API requestDidStart will turn thrown generic errors into a 500 I think.)
4b2f9d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted back to @helenwh's original approach in 6c9aa8f.