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

Improve JSON.parse errors #95

Closed
jaydenseric opened this issue Jul 31, 2018 · 0 comments
Closed

Improve JSON.parse errors #95

jaydenseric opened this issue Jul 31, 2018 · 0 comments
Labels

Comments

@jaydenseric
Copy link
Owner

jaydenseric commented Jul 31, 2018

JSON.parse errors are not handled nicely like other errors are. A custom error class should be exported, and the instances should have a 400 status code for a correct response to the client.

See:

To duplicate the issue: With a basic server setup like the example API, send a multipart GraphQL request with a JSON syntax error in one of the JSON form fields. The response to the client will be a 500 status, when it should be a 400.

krasivyy3954 added a commit to krasivyy3954/react-graphql-upload that referenced this issue Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant