Skip to content

Upgrade cause loss of originalError #2213

@purpleD17

Description

@purpleD17

We 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.

if (error instanceof Error) {

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions