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.
This commit is contained in:
Armin Braun 2020-09-15 18:27:39 +02:00 committed by GitHub
parent 98f525f8a7
commit ffbc64bd10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -219,8 +219,10 @@ public class InboundHandler {
response = handler.read(stream);
response.remoteAddress(new TransportAddress(remoteAddress));
} catch (Exception e) {
handleException(handler, new TransportSerializationException(
"Failed to deserialize response from handler [" + handler + "]", e));
final Exception serializationException = new TransportSerializationException(
"Failed to deserialize response from handler [" + handler + "]", e);
logger.warn(new ParameterizedMessage("Failed to deserialize response from [{}]", remoteAddress), serializationException);
handleException(handler, serializationException);
return;
}
final String executor = handler.executor();