Skip to content

Commit

Permalink
Only log at DEBUG if graphql endpoint already finished the HTTP response
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartisk committed Feb 13, 2023
1 parent 96203bb commit 4252cef
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 4252cef

Please sign in to comment.