Skip to content

Commit ffbc64b

Browse files
Log WARN on Response Deserialization Failure (#62368) (#62388)
We never see this exception in the logs even though it's pretty severe. All we might see is an exception about a transport message not having been read fully from the logic that follows this code. Technically we should probably bubble up the exception but that's a bigger change and needs some carefully reasoning, this change for the time being at least simplifies tracking down deserialization issues in responses.
1 parent 98f525f commit ffbc64b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/src/main/java/org/elasticsearch/transport/InboundHandler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,10 @@ private <T extends TransportResponse> void handleResponse(InetSocketAddress remo
219219
response = handler.read(stream);
220220
response.remoteAddress(new TransportAddress(remoteAddress));
221221
} catch (Exception e) {
222-
handleException(handler, new TransportSerializationException(
223-
"Failed to deserialize response from handler [" + handler + "]", e));
222+
final Exception serializationException = new TransportSerializationException(
223+
"Failed to deserialize response from handler [" + handler + "]", e);
224+
logger.warn(new ParameterizedMessage("Failed to deserialize response from [{}]", remoteAddress), serializationException);
225+
handleException(handler, serializationException);
224226
return;
225227
}
226228
final String executor = handler.executor();

0 commit comments

Comments
 (0)