Open joeyeng opened 3 years ago
Related to #1584.
@sebastianburckhardt, I'm curious if we can make improvements to just throwing ambiguous match exception. For instance, can we identify by looking at the event sent whether to invoke the interface overload that has 0 or 1 parameters?
Description
Expected behavior
Actual behavior
Stack trace:
@bulkcalculationstate@f2b52896-d253-4871-92f0-bec867712d77: Function 'bulkcalculationstate (Entity)' failed 'AddFees' operation 08d8f9af-e35a-4eea-baed-4abbc8398ca2 after 0.9082ms with exception System.Reflection.AmbiguousMatchException: Ambiguous match found. at System.RuntimeType.GetMethodImplCommon(String name, Int32 genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers) at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers) at System.Type.GetMethod(String name, BindingFlags bindingAttr) at Microsoft.Azure.WebJobs.Extensions.DurableTask.TypedInvocationExtensions.FindMethodForContext[T](IDurableEntityContext context) in D:\a\r1\a\azure-functions-durable-extension\src\WebJobs.Extensions.DurableTask\EntityScheduler\TypedInvocationExtensions.cs:line 102 at Microsoft.Azure.WebJobs.Extensions.DurableTask.TypedInvocationExtensions.DispatchAsync[T](IDurableEntityContext context, Object[] constructorParameters) in D:\a\r1\a\azure-functions-durable-extension\src\WebJobs.Extensions.DurableTask\EntityScheduler\TypedInvocationExtensions.cs:line 37 at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker
2.InvokeAsync(TReflected instance, Object[] arguments) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\VoidTaskMethodInvoker.cs:line 20 at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker
2.InvokeAsync(Object instance, Object[] arguments) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 52 at Microsoft.Azure.WebJobs.Extensions.DurableTask.TaskEntityShim.ProcessOperationRequestAsync(RequestMessage request) in D:\a\r1\a\azure-functions-durable-extension\src\WebJobs.Extensions.DurableTask\Listener\TaskEntityShim.cs:line 319. Input: (1060 bytes). IsReplay: False.App Details
If deployed to Azure