GH-901 add more logging around failed conversion of input messages
Resolves #901
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user