Exception when using items/delta if there is a deleted item
nygsebjsc opened this issue · 0 comments
nygsebjsc commented
Using
var response = await client.Sites[SiteId].Lists[ListId].Items.Delta.WithUrl(deltaLink).GetAsDeltaGetResponseAsync();
Will cause a json parse exception when there is an item has been deleted.
System.Text.Json.JsonReaderException: Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. LineNumber: 0 | BytePositionInLine: 1102.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
at System.Text.Json.JsonDocument.Parse(Stream utf8Json, JsonDocumentOptions options)
at Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory.GetRootParseNode(String contentType, Stream content)
at Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNode(String contentType, Stream content)
at Microsoft.Kiota.Abstractions.Serialization.ParseNodeFactoryRegistry.GetRootParseNode(String contentType, Stream content)
at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.GetRootParseNode(HttpResponseMessage response, CancellationToken cancellationToken)
at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendAsync[ModelType](RequestInformation requestInfo, ParsableFactory`1 factory, Dictionary`2 errorMapping, CancellationToken cancellationToken)
at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendAsync[ModelType](RequestInformation requestInfo, ParsableFactory`1 factory, Dictionary`2 errorMapping, CancellationToken cancellationToken)
at Microsoft.Graph.Beta.Sites.Item.Lists.Item.Items.Delta.DeltaRequestBuilder.GetAsDeltaGetResponseAsync(Action`1 requestConfiguration, CancellationToken cancellationToken)