Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support more detailed errors within Python generator in JSON parsing #3069

Open
armandobelardo opened this issue Feb 27, 2024 · 0 comments
Labels
python Python models, clients, and server interfaces

Comments

@armandobelardo
Copy link
Collaborator

Problem description

Today, in the event the JSON response cannot be parsed to the corresponding Pydantic object, we throw generic Pydantic errors, ex:

pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[EntitySummaryResponse]
__root__ -> attributes -> address -> data -> 1 -> properties -> type

This is nice IF you have the data and can see the problematic data you're receiving, however in this instance, Pydantic does not return the actual problematic data and so you have to have stored the JSON elsewhere to analyze it and see what's causing issues.

This could go hand in hand with broader improvements to debugging (think: being able to log the full sent request, loggging the response, etc.)

Why would it be useful?

You could imagine support teams at companies asking users to flip on detailed debugging or other feature on their client, should there be an issue to be able to send detailed logs.
In general, being able to provide more insight into why clients are not responding as they should (e.g. getting a look into the requests and responses being sent) could be pretty valuable

@armandobelardo armandobelardo added the python Python models, clients, and server interfaces label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Python models, clients, and server interfaces
Development

No branches or pull requests

1 participant