Skip to content

Conversation

@kevxms
Copy link
Contributor

@kevxms kevxms commented Jan 7, 2025

This fixes a bug where a conflict response having null content causes null reference exception but should throw OrchestrationAlreadyExistsException

DurableTask.AzureServiceFabric.Exceptions.RemoteServiceException: CreateTaskOrchestrationAsync failed with status code InternalServerError: {"$type":"System.NullReferenceException, mscorlib","ClassName":"System.NullReferenceException","Message":"Object reference not set to an instance of an object.","Data":{"$type":"System.Collections.ListDictionaryInternal, mscorlib","MS_LoggedBy":{"$type":"System.Collections.Generic.List`1[[System.Object, mscorlib]], mscorlib","$values":[{"$type":"DurableTask.AzureServiceFabric.Service.ProxyServiceExceptionLogger, DurableTask.AzureServiceFabric"}]}},"InnerException":null,"HelpURL":null,"StackTraceString":"
   at DurableTask.AzureServiceFabric.Service.FabricOrchestrationServiceController.<CreateTaskOrchestration>d__2.MoveNext() in /_/src/DurableTask.AzureServiceFabric/Service/FabricOrchestrationServiceController.cs:line 53\r\n
--- End of stack trace from previous location where exception was thrown ---\r\n
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()\r\n
--- End of stack trace from previous location where exception was thrown ---\r\n
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n
--- End of stack trace from previous location where exception was thrown ---\r\n
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n
--- End of stack trace from previous location where exception was thrown ---\r\n
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()\r\n
--- End of stack trace from previous location where exception was thrown ---\r\n
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()\r\n
--- End of stack trace from previous location where exception was thrown ---\r\n
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
   at DurableTask.AzureServiceFabric.Service.ActivityLoggingMessageHandler.<SendAsync>d__0.MoveNext() in /_/src/DurableTask.AzureServiceFabric/Service/ActivityLoggingMessageHandler.cs:line 35","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nMoveNext\nDurableTask.AzureServiceFabric, Version=2.3.11.0, Culture=neutral, PublicKeyToken=d53979610a6e89dd\nDurableTask.AzureServiceFabric.Service.FabricOrchestrationServiceController+<CreateTaskOrchestration>d__2\nVoid MoveNext()","HResult":-2147467261,"Source":"DurableTask.AzureServiceFabric","WatsonBuckets":null}
   at DurableTask.AzureServiceFabric.Remote.RemoteOrchestrationServiceClient.<PutJsonAsync>d__27.MoveNext() in /_/src/DurableTask.AzureServiceFabric/Remote/RemoteOrchestrationServiceClient.cs:line 320
   at DurableTask.AzureServiceFabric.Remote.RemoteOrchestrationServiceClient.<CreateTaskOrchestrationAsync>d__11.MoveNext() in /_/src/DurableTask.AzureServiceFabric/Remote/RemoteOrchestrationServiceClient.cs:line 102
   at DurableTask.Core.TaskHubClient.<InternalCreateOrchestrationInstanceWithRaisedEventAsync>d__27.MoveNext() in /_/src/DurableTask.Core/TaskHubClient.cs:line 624

@NeetArt
Copy link
Member

NeetArt commented Jan 9, 2025

Can you also bump up the version in the DurableTask.AzureServiceFabric.csproj file?

@NeetArt NeetArt merged commit 5046aad into Azure:main Jan 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants