Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add originalError #470

Merged
merged 1 commit into from
Nov 18, 2019
Merged

add originalError #470

merged 1 commit into from
Nov 18, 2019

Conversation

JoviDeCroock
Copy link
Collaborator

@JoviDeCroock JoviDeCroock commented Nov 17, 2019

So I think this is better than relying on the Error instance received from the backend having an originalError property this way we allow for our users to have enriched errors with for instance code or key.

In the docs they also state this to be an Error instance so I think this is perfectly valid https://graphql.org/graphql-js/error/#graphqlerror

Resolves: #469

Copy link
Member

@kitten kitten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! I didn’t realise that we could just point at the raw serialised error here, but that makes complete sense 👌

@kitten kitten merged commit 94bb645 into master Nov 18, 2019
@JoviDeCroock JoviDeCroock deleted the originalError branch November 18, 2019 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

how to retrieve the error name as provided by the graphql server?
2 participants