2026-04-16 14:56:39 | Log4Net | Error in recursiveQuery : 'Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 397cc417-e778-4d3d-b1b2-f8ef66c64537; Reason: ({"code":"BadRequest","message":"{\"errors\":[{\"severity\":\"Error\",\"location\":{\"start\":522,\"end\":556},\"code\":\"SC1012\",\"message\":\"Syntax error, invalid string literal token '' )  order by materiallog._ts desc'.\"}]}\r\nActivityId: 397cc417-e778-4d3d-b1b2-f8ef66c64537, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0"}, Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, Windows/10.0.20348 cosmos-netstandard-sdk/3.37.5);'
 Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 397cc417-e778-4d3d-b1b2-f8ef66c64537; Reason: ({"code":"BadRequest","message":"{\"errors\":[{\"severity\":\"Error\",\"location\":{\"start\":522,\"end\":556},\"code\":\"SC1012\",\"message\":\"Syntax error, invalid string literal token '' )  order by materiallog._ts desc'.\"}]}\r\nActivityId: 397cc417-e778-4d3d-b1b2-f8ef66c64537, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0"}, Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, Windows/10.0.20348 cosmos-netstandard-sdk/3.37.5);
   at Microsoft.Azure.Cosmos.GatewayStoreClient.<ParseResponseAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Cosmos.GatewayStoreClient.<InvokeAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Cosmos.GatewayStoreModel.<ProcessMessageAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Azure.Cosmos.GatewayStoreModel.<ProcessMessageAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Cosmos.Handlers.TransportHandler.<ProcessMessageAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Cosmos.Handlers.TransportHandler.<SendAsync>d__2.MoveNext()
--- Cosmos Diagnostics ---{"Summary":{"GatewayCalls":{"(200, 0)":1,"(400, 0)":1}},"name":"Typed FeedIterator ReadNextAsync","start datetime":"2026-04-16T14:56:39.014Z","duration in milliseconds":270.3944,"data":{"Client Configuration":{"Client Created Time Utc":"2026-04-16T14:56:39.0140142Z","MachineId":"hashedMachineName:6e58dd45-9e7e-c021-0268-275960ac67c8","NumberOfClientsCreated":171411,"NumberOfActiveClients":0,"ConnectionMode":"Direct","User Agent":"cosmos-netstandard-sdk/3.46.1|10|X86|Microsoft Windows 10.0.20348 |.NET Framework 4.8.9315.0|N|","ConnectionConfig":{"gw":"(cps:50, urto:6, p:False, httpf: False)","rntbd":"(cto: 5, icto: -1, mrpc: 30, mcpe: 65535, erd: True, pr: ReuseUnicastPort)","other":"(ed:False, be:False)"},"ConsistencyConfig":"(consistency: NotSet, prgns:[], apprgn: )","ProcessorCount":2},"Synchronization Context":"System.Web.AspNetSynchronizationContext","Query Correlated ActivityId":"2608a878-d5ce-454d-af40-995e9c0ef267"},"children":[{"name":"Create Query Pipeline","duration in milliseconds":262.1188,"children":[{"name":"Get Container Properties","duration in milliseconds":33.114200000000004,"children":[{"name":"Get Collection Cache","duration in milliseconds":14.477500000000001,"children":[{"name":"Waiting for Initialization of client to complete","duration in milliseconds":14.4741}]},{"name":"Read Collection","duration in milliseconds":18.544900000000002,"data":{"Client Side Request Stats":{"Id":"AggregatedClientSideRequestStatistics","ContactedReplicas":[],"RegionsContacted":[],"FailedReplicas":[],"AddressResolutionStatistics":[],"StoreResponseStatistics":[],"HttpResponseStats":[{"StartTimeUTC":"2026-04-16T14:56:39.0296331Z","DurationInMs":15.67,"RequestUri":"https://vitallog-eastus.documents.azure.com/dbs/vitallog/colls/materiallog","ResourceType":"Collection","HttpMethod":"GET","ActivityId":"fe812d1b-48a7-4d03-aaac-52991d11c88e","StatusCode":"OK"}]}}}]},{"name":"Parse Query","duration in milliseconds":79.9178},{"name":"Gateway QueryPlan","duration in milliseconds":47.2173},{"name":"Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler","duration in milliseconds":94.736100000000008,"children":[{"name":"Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler","duration in milliseconds":89.2393,"data":{"System Info":{"systemHistory":[{"dateUtc":"2026-04-16T14:55:49.1452872Z","cpu":1.719,"memory":5211736.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.1167,"availableThreads":8190,"minThreads":2,"maxThreads":8191},"numberOfOpenTcpConnection":0},{"dateUtc":"2026-04-16T14:55:59.1482081Z","cpu":0.391,"memory":5209824.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.1075,"availableThreads":8190,"minThreads":2,"maxThreads":8191},"numberOfOpenTcpConnection":0},{"dateUtc":"2026-04-16T14:56:09.1602017Z","cpu":12.559,"memory":5171568.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0901,"availableThreads":8190,"minThreads":2,"maxThreads":8191},"numberOfOpenTcpConnection":0},{"dateUtc":"2026-04-16T14:56:19.1738662Z","cpu":11.310,"memory":5171996.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0828,"availableThreads":8190,"minThreads":2,"maxThreads":8191},"numberOfOpenTcpConnection":0},{"dateUtc":"2026-04-16T14:56:29.1852911Z","cpu":7.722,"memory":5178992.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0825,"availableThreads":8190,"minThreads":2,"maxThreads":8191},"numberOfOpenTcpConnection":0},{"dateUtc":"2026-04-16T14:56:39.1858899Z","cpu":3.906,"memory":5175984.000,"threadInfo":{"isThreadStarving":"False","threadWaitIntervalInMs":0.0945,"availableThreads":8189,"minThreads":2,"maxThreads":8191},"numberOfOpenTcpConnection":0}]}},"children":[{"name":"Microsoft.Azure.Cosmos.Handlers.TelemetryHandler","duration in milliseconds":89.2291,"children":[{"name":"Microsoft.Azure.Cosmos.Handlers.RetryHandler","duration in milliseconds":89.2236,"children":[{"name":"Microsoft.Azure.Cosmos.Handlers.RouterHandler","duration in milliseconds":89.195000000000007,"children":[{"name":"Microsoft.Azure.Cosmos.Handlers.TransportHandler","duration in milliseconds":89.1922,"children":[{"name":"Microsoft.Azure.Cosmos.GatewayStoreModel Transport Request","duration in milliseconds":88.5125,"data":{"Client Side Request Stats":{"Id":"AggregatedClientSideRequestStatistics","ContactedReplicas":[],"RegionsContacted":[],"FailedReplicas":[],"AddressResolutionStatistics":[],"StoreResponseStatistics":[],"HttpResponseStats":[{"StartTimeUTC":"2026-04-16T14:56:39.2171352Z","DurationInMs":0,"RequestUri":"https://vitallog-eastus.documents.azure.com/dbs/vitallog/colls/materiallog/docs","ResourceType":"Document","HttpMethod":"POST","ActivityId":"397cc417-e778-4d3d-b1b2-f8ef66c64537","StatusCode":"BadRequest","ReasonPhrase":"Bad Request"}]},"Point Operation Statistics":{"Id":"PointOperationStatistics","ActivityId":"397cc417-e778-4d3d-b1b2-f8ef66c64537","ResponseTimeUtc":"2026-04-16T14:56:39.2796360Z","StatusCode":400,"SubStatusCode":0,"RequestCharge":0,"RequestUri":"dbs/vitallog/colls/materiallog","ErrorMessage":"Microsoft.Azure.Documents.DocumentClientException: {\"code\":\"BadRequest\",\"message\":\"{\\\"errors\\\":[{\\\"severity\\\":\\\"Error\\\",\\\"location\\\":{\\\"start\\\":522,\\\"end\\\":556},\\\"code\\\":\\\"SC1012\\\",\\\"message\\\":\\\"Syntax error, invalid string literal token '' )  order by materiallog._ts desc'.\\\"}]}\\r\\nActivityId: 397cc417-e778-4d3d-b1b2-f8ef66c64537, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0\"}, Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, Windows/10.0.20348 cosmos-netstandard-sdk/3.37.5\r\n   at Microsoft.Azure.Cosmos.GatewayStoreClient.<ParseResponseAsync>d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Cosmos.GatewayStoreClient.<InvokeAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Cosmos.GatewayStoreModel.<ProcessMessageAsync>d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at Microsoft.Azure.Cosmos.GatewayStoreModel.<ProcessMessageAsync>d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Cosmos.Handlers.TransportHandler.<ProcessMessageAsync>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Cosmos.Handlers.TransportHandler.<SendAsync>d__2.MoveNext()","RequestSessionToken":null,"ResponseSessionToken":null,"BELatencyInMs":null}}}]}]}]}]}]}]}]},{"name":"Query Response Serialization","duration in milliseconds":0.0466}]}
