You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"error": {
"code": "invalidRequest",
"message": "One or more errors occurred. (One or more errors occurred. (A type named 'microsoft.toDo.todoTask' could not be resolved by the model. When a model is available, each type name must resolve to a valid type.))",
"innerError": {
"code": "InvalidModel",
"date": "2022-07-20T13:52:13",
"request-id": "e4ad2f1c-a189-4ee5-80ef-0124626352d1",
"client-request-id": "e4ad2f1c-a189-4ee5-80ef-0124626352d1"
}
}
}
Removing both odata.type resolves the issue. This was working in 5.8.0-preview, so I assume this has to do with #493
Expected behavior
TodoTask is properly created
Client version
5.10.0-preview
Desktop (please complete the following information):
OS: Win 10 x64
Browser: N/A, WinForms application using standard HttpClient
Version: N/A
The text was updated successfully, but these errors were encountered:
var newTodoTask = new TodoTask
{
Title = NEW_TODOTASK_TITLE,
Body = new ItemBody { Content = "-", ContentType = BodyType.Text },
};
newTodoTask = await graphClient.Me.Todo.Lists[taskList.Id].Tasks.PostAsync(newTodoTask).ConfigureAwait(true);
ex.Message: Exception of type 'Microsoft.Graph.Beta.Models.ODataErrors.ODataError' was thrown.
ex.Source: Microsoft.Kiota.Http.HttpClientLibrary
ex.Error.Message: One or more errors occurred. (One or more errors occurred. (A type named 'microsoft.toDo.todoTask' could not be resolved by the model. When a model is available, each type name must resolve to a valid type.))
Describe the bug
TodoTask is serialized in a way that the server does not understand it
To Reproduce
Create new TodoTask and try to add it to existing task list. Example code:
This gets serialized as following:
And server replies with
Removing both odata.type resolves the issue. This was working in 5.8.0-preview, so I assume this has to do with #493
Expected behavior
TodoTask is properly created
Client version
5.10.0-preview
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: