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

Handle graphql server error #86

Closed
ohardy opened this issue Sep 25, 2017 · 1 comment
Closed

Handle graphql server error #86

ohardy opened this issue Sep 25, 2017 · 1 comment

Comments

@ohardy
Copy link

ohardy commented Sep 25, 2017

renderError is never called when my GraphQL server return for example :

{"errors":[{"locations":[{"column":3,"line":5}],"message":"current transaction is aborted, commands ignored until end of transaction block\n"}],"data":{"category":null}}

How catch that and redirect the user to a specific page ?

@taion
Copy link
Member

taion commented Sep 25, 2017

If you want to redirect, see https://github.com/4Catalyzer/found-relay/blob/master/test/modern/render.test.js#L132

If you're looking to render errors in general, see facebook/relay#1913

renderError only gets called if you throw HttpError from render

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

No branches or pull requests

2 participants