You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -51,9 +55,21 @@ public DefaultModelBindingFeature(IEnumerable<IConverter> converters)
51
55
}
52
56
elseif(sourceis not null)
53
57
{
54
-
thrownewInvalidCastException($"Cannot convert input parameter '{param.Name}' for Function '{context.FunctionDefinition.Name}' to type '{param.Type.FullName}' from type '{source.GetType().FullName}'.");
58
+
// Don't initialize this list unless we have to
59
+
if(errorsisnull)
60
+
{
61
+
errors=newList<string>();
62
+
}
63
+
64
+
errors.Add($"Cannot convert input parameter '{param.Name}' to type '{param.Type.FullName}' from type '{source.GetType().FullName}'.");
55
65
}
56
66
}
67
+
68
+
// found errors
69
+
if(errorsis not null)
70
+
{
71
+
thrownewFunctionInputConverterException($"Error converting {errors.Count} input parameters for Function '{context.FunctionDefinition.Name}': {string.Join(" ",errors)}");
0 commit comments