-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Usually the api comes back looking something like this:
'search_info': {'total_results': '2950', 'search_time': '0.46'}
But when I run a search which returns no results:
'search_info': {'total_results': 0, 'search_time': '0.34'}
You'll notice the total results is number zero, rather than a string.
This causes:
pydantic_core._pydantic_core.ValidationError: 1 validation error for SearchResponse
total_results
Input should be a valid string [type=string_type, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.12/v/string_typepydantic_core._pydantic_core.ValidationError: 1 validation error for SearchResponse
total_results
Input should be a valid string [type=string_type, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.12/v/string_type
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels