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
Describe the bug
When Graph returns an error including an innerError, it won't be correctly deserialized. The problem is the naming of the property should be innerError and not innererror.
To Reproduce
An example response we got back from graph was:
{
"error": {
"code": "badRequest",
"message": "Bad request.",
"innerError": {
"code": "invalidAssignmentState",
"message": "Assignment in 'Assigned' state cannot be published.",
"date": "2023-05-22T10:32:35",
"request-id": "69d650fe-b1c1-4d9e-8f95-2551fb19d4c7",
"client-request-id": "07b4f45c-e2eb-0392-8f94-d5d022c830ae"
}
}
}
publicIDictionary<string,Action<IParseNode>>GetFieldDeserializers(){returnnewDictionary<string,Action<IParseNode>>{{"code", n =>{Code=n.GetStringValue();}},{"details", n =>{Details=n.GetCollectionOfObjectValues<ErrorDetails>(ErrorDetails.CreateFromDiscriminatorValue)?.ToList();}},{"innererror", n =>{Innererror=n.GetObjectValue<Microsoft.Graph.Models.ODataErrors.InnerError>(Microsoft.Graph.Models.ODataErrors.InnerError.CreateFromDiscriminatorValue);}},{"message", n =>{Message=n.GetStringValue();}},{"target", n =>{Target=n.GetStringValue();}},};}
You'll see the wrong naming leading to the problem, that the property will return null instead of the filled instance.
The text was updated successfully, but these errors were encountered:
Describe the bug
When Graph returns an error including an innerError, it won't be correctly deserialized. The problem is the naming of the property should be
innerError
and notinnererror
.To Reproduce
An example response we got back from graph was:
But if you take a look at the code
You'll see the wrong naming leading to the problem, that the property will return
null
instead of the filled instance.The text was updated successfully, but these errors were encountered: