Skip to content

Commit

Permalink
Merge pull request #31109 from jmartisk/main-issue-31034
Browse files Browse the repository at this point in the history
Only log at DEBUG if graphql endpoint already finished the HTTP response
  • Loading branch information
jmartisk authored Feb 13, 2023
2 parents 46068a3 + 4252cef commit ffb4f3f
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,16 @@ public void write(ExecutionResponse er) {
response.setStatusCode(500)
.end();
} else {
response.setStatusCode(200)
.setStatusMessage(OK)
.end(Buffer.buffer(er.getExecutionResultAsString(), requestedCharset));
try {
response.setStatusCode(200)
.setStatusMessage(OK)
.end(Buffer.buffer(er.getExecutionResultAsString(), requestedCharset));
} catch (IllegalStateException ise) {
// The application already finished the request by itself for some reason
if (log.isDebugEnabled()) {
log.debug("Cannot write response", ise);
}
}
}
}

Expand Down

0 comments on commit ffb4f3f

Please sign in to comment.