logging: httpupload do not warn with exception trace (#9220)

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
This commit is contained in:
Abhishek Kumar 2024-06-12 17:27:41 +05:30 committed by GitHub
parent e2e46e3108
commit 5c749eced2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -295,7 +295,8 @@ public class HttpUploadServerHandler extends SimpleChannelInboundHandler<HttpObj
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
logger.warn(responseContent.toString(), cause);
logger.warn(String.format("%s. Exception occurred: %s", responseContent.toString(), cause.getMessage()));
logger.debug("Exception caught by HTTP upload handler, caused due to: ", cause);
responseContent.append("\r\nException occurred: ").append(cause.getMessage());
writeResponse(ctx.channel(), HttpResponseStatus.INTERNAL_SERVER_ERROR);
ctx.channel().close();