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

Validation error for WebSearchApiResponse #42

Open
boat-builder opened this issue May 31, 2024 · 1 comment
Open

Validation error for WebSearchApiResponse #42

boat-builder opened this issue May 31, 2024 · 1 comment

Comments

@boat-builder
Copy link

I occasionally get this error from the client. I don't have enough information to reproduce. I believe its a transient error from their API. On pydantic validation error, it would be nice to show what was the actual API response or would be nice to have a way to fetch the raw API response somehow.

    | pydantic_core._pydantic_core.ValidationError: 1 validation error for WebSearchApiResponse
    | videos.results.0.video.views
    |   Input should be a valid string [type=string_type, input_value=29569, input_type=int]
    |     For further information visit https://errors.pydantic.dev/2.7/v/string_type

Happy to contribute a fix if you know something or contribute atleast some debugging code into the library

@boat-builder
Copy link
Author

boat-builder commented May 31, 2024

Okey, I was dumb to not look at where the issue was. Can we just make the video.views Union[int, str] ?

@boat-builder boat-builder changed the title Validateion error for WebSearchApiResponse Validation error for WebSearchApiResponse Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant