AspNetCoreOData
AspNetCoreOData copied to clipboard
System.NullReferenceException Microsoft.AspNetCore.Routing.Matching.DfaMatcher.<SelectEndpointWithPoliciesAsync> (Intermittent Issue)
Describe the bug There is an intermittent System.NullReferenceException. The exception occurs in the SelectEndpointWithPoliciesAsync method. There are no specific steps to reproduce the issue, but telemetry data has shown the occurrence of this exception.
Expected behavior The method should execute without throwing a NullReferenceException.
Stack Trace ODataExceptionHandlerMiddleware: Unexpected error Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.d__13.MoveNext() +0xcc at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<g__AwaitMatch|10_1>d.MoveNext() +0x65 at Microsoft.AspNet.OData.Batch.ODataBatchMiddleware.d__2.MoveNext() +0x15f