Upgrade cause loss of originalError
See original GitHub issueWe are upgrading to latest graphql and express graphql in our Node app from very old versions (graphql 0.8, graphqlexpress 0.7). In doing so we lose the error response data in our underlying api calls graphql is making. I traced the issue here.
At one point in the older releases, an error object with a nested originalError was returned. Now instead I get only a string back.
If instead of doing new Error(error.errorString) the code would call new GraphQLError(...,...,...,error) where error is the originalError part, then I can extract the data from my error object in the graphql express module as referenced here : https://github.com/graphql/express-graphql/blob/master/README.md#debugging-tips
At one point the code must have returned an error that wrapped the originalError object and now it does not, it only returns an error that wraps a string.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
You should just make sure your custom error object inherits from Error? Maybe share the format of that object?
Yes I’ll do that.