Graph SDK throwing exception on Get Call request. Is something changed in Microsoft Graph SDK?
Aqsa Asif
1
Reputation point
When a call is made to get the current call using the graph SDK it is throwing exception. This exception is thrown at this line of code:
var result = await graphClient.Communications.Calls["{call-id}"].GetAsync();
This code was working fine but a few days ago this exception is thrown each time this method is called. This is probably happening due to some change on graph SDK.
I am using the Graph SDK with beta API.
Can anyone explain the reason and solution to this problem?
exception: '{' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 2537.
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options)
at System.Text.Json.JsonSerializer.ReadAllAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
at Microsoft.Graph.Serializer.DeserializeObject[T](Stream stream)
at Microsoft.Graph.ResponseHandler.HandleResponse[T](HttpResponseMessage response)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Microsoft.Graph.CallRequest.GetAsync(CancellationToken cancellationToken)
at ...
Inner exception: '{' is an invalid start of a property name. Expected a '"'. LineNumber: 0 | BytePositionInLine: 2537.
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.Utf8JsonReader.TrySkip()
at System.Text.Json.JsonDocument.TryParseValue(Utf8JsonReader& reader, JsonDocument& document, Boolean shouldThrow, Boolean useArrayPools)
at Microsoft.Graph.DerivedTypeConverter`1.Read(Utf8JsonReader& reader, Type objectType, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
Sign in to answer