You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing unexpected behaviors when getting thousands of queries. For some reason, sometimes the API returns an empty response. It happens at random (1 time out of 10000 perhaps).
When this situation happens, the method SerpApiClient.get_json does not handle the empty response. In consecuence, the json.loads() raises an exception causing a JSONDecodeError.
I attach an image to clarify the issue.
It seems a problem with the API service. Not sure if the problem should be solved with an Exception handling, handling the code 204 (empty response), or if there is any bug with servers.
to reproduce the exception:
import json json.loads('')
Do you recommend any guidelines to handle the problem in the meanwhile you review the issue on the source code?
Thanks.
The text was updated successfully, but these errors were encountered:
I am experiencing unexpected behaviors when getting thousands of queries. For some reason, sometimes the API returns an empty response. It happens at random (1 time out of 10000 perhaps).
When this situation happens, the method SerpApiClient.get_json does not handle the empty response. In consecuence, the json.loads() raises an exception causing a JSONDecodeError.
I attach an image to clarify the issue.
It seems a problem with the API service. Not sure if the problem should be solved with an Exception handling, handling the code 204 (empty response), or if there is any bug with servers.
to reproduce the exception:
import json json.loads('')
Do you recommend any guidelines to handle the problem in the meanwhile you review the issue on the source code?
Thanks.
The text was updated successfully, but these errors were encountered: