mercurius-js / validation

Adds configurable validation support to Mercurius.
MIT License
30 stars 6 forks source link

Return status code 400 for validation errors #52

Closed anthonyroach closed 2 years ago

anthonyroach commented 2 years ago

Errors in validation mean the client sent something invalid, so the response status code should be 400 (Bad Request) rather than the default status code of 500 (Internal Server Error).

Fixes #51