GH-901 add more logging around failed conversion of input messages

Resolves #901
This commit is contained in:
Oleg Zhurakousky
2022-07-26 17:35:49 +02:00
parent 6b1752f4e4
commit 342c2bb533
2 changed files with 5 additions and 2 deletions

View File

@@ -1325,6 +1325,9 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
? SimpleFunctionRegistry.this.messageConverter.fromMessage(message, rawType, itemType)
: SimpleFunctionRegistry.this.messageConverter.fromMessage(message, rawType);
if (convertedInput != null && !rawType.isAssignableFrom(convertedInput.getClass())) {
logger.warn("Failed to convert input to " + rawType + ". Will attempt to invoke function with raw type");
}
if (FunctionTypeUtils.isMessage(type)) {
if (convertedInput == null) {

View File

@@ -66,8 +66,8 @@ public class SmartCompositeMessageConverter extends CompositeMessageConverter {
}
}
catch (Exception e) {
if (logger.isDebugEnabled()) {
logger.debug("Failure during type conversion by " + converter + ". Will try the next converter.", e);
if (logger.isWarnEnabled()) {
logger.warn("Failure during type conversion by " + converter + ". Will try the next converter.", e);
}
}
}