How to configure to robustly de-serialize collections (get_collection_of_object_values) #6163
Replies: 4 comments 8 replies
-
Hi @thelazydogsback You are correct in the sense that kiota's default serialization providers are fairly strict. We'd rather fail noisily when something is wrong than silently do something wrong when it comes to something as crucial as integrating with APIs. Let us know if you have any additional comments or questions. |
Beta Was this translation helpful? Give feedback.
-
Thanks, @baywet. This is another case (such as internal/k8s network authentication using plain http, etc.) where reality isn't quite as nice as we'd like when designing a framework. |
Beta Was this translation helpful? Give feedback.
-
@baywet Given this stack trace: It looks like maybe either the exception-handler is to narrow, or you need to check for an empty string first: So during a |
Beta Was this translation helpful? Give feedback.
-
Also, I think the call to |
Beta Was this translation helpful? Give feedback.
-
Some of my entities do not have the correct type/value of properties which fail during deserialization.
How can I configure my python Kiota client to be robust to these errors?
Specifically, if I'm retrieving a page of objects, then the entire page will fail if there is an invalid entity.
I would like to be able to still get valid entities while skipping the bad ones, and possibly collecting the errors/ids of ones that caused the errors.
I had thought about setting my pageSize=1, but that doesn't work, as the entire request will fail and I'm unable to get the continuation token for the next page.
thanks
Beta Was this translation helpful? Give feedback.
All reactions