Kiota does not support array of errors #3827
Labels
enhancement
New feature or request
generator
Issues or improvements relater to generation capabilities.
help wanted
Issue caused by core project dependency modules or library
Milestone
Let's say your OpenAPI operation error looks like that:
And the
RestApiError
schema looks like that:The generated
RestApiError
class (which inherits fromApiException
) can't be deserialized properly.Here's a sample (actual) 404 error response:
When thrown, the
ErrorCode
isnull
and theMessage
isException of type 'MySdk.Models.RestApiError' was thrown.
I'm not sure how Kiota should handle this situation where the error response is an array instead of an object and how the error class should be generated but currently the useful information (errorCode + message) is lost.
I was able to see the problem in the
AssignFieldValues
method ofMicrosoft.Kiota.Serialization.Json.JsonParseNode
(which seems to be source generated)The text was updated successfully, but these errors were encountered: