Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

fix(#524): return valid error even if request body is invalid #616

Conversation

BlasiusSecundus
Copy link

A valid GraphQL error response is returned instead with a descriptive error message. Details of the parse error is logged server-side.

@oliemansm oliemansm added this to the 11.1.0 milestone May 8, 2021
@oliemansm
Copy link
Member

@BlasiusSecundus You're not actually returning a 500 status code but it stays a 200 OK reponse code right? Seeing the code and also your comment on the linked issue. It's just that the subject of this PR communicates something else, so wanted to double check.

@BlasiusSecundus
Copy link
Author

Yes, the commit message is misleading. The bug was the 500 error, not the fix. I will correct that.

…ody is invalid

A valid GraphQL error response is returned with a descriptive
error message instead of HTTP 500 with internal details.

Details of the parse error is logged server-side.
@BlasiusSecundus BlasiusSecundus force-pushed the feature/fix-invalid-json-handling branch from 8a94165 to 740491f Compare May 8, 2021 12:26
@BlasiusSecundus BlasiusSecundus changed the title fix(#524): http 500 error if request body was invalid json fix(#524): return valid error even if request body is invalid May 8, 2021
@BlasiusSecundus BlasiusSecundus linked an issue May 8, 2021 that may be closed by this pull request
@oliemansm oliemansm merged commit 41b1626 into graphql-java-kickstart:master May 8, 2021
@BlasiusSecundus BlasiusSecundus deleted the feature/fix-invalid-json-handling branch June 22, 2021 18:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On Spring Webflux, invalid json request results in HTTP 500
2 participants