Was updating some samples and found when calling the Google Cloud Vision API with the python client library which has some handwritten helper methods making it a partial GAPIC library, that if the users passes a URL that the API can't reach, the API returns an error message, but the client library doesn't throw the error rather returns it as part of the response.
Call request: response = client.text_detection(image=image)
If you examine the response object from the api you'll find this:
error {
code: 3
message: "The URL does not appear to be accessible by us. Please double check or download the content and pass it in."
}
Seems like we should throw this error.
Related PR that I discovered this in: GoogleCloudPlatform/python-docs-samples#2569
Was updating some samples and found when calling the Google Cloud Vision API with the python client library which has some handwritten helper methods making it a partial GAPIC library, that if the users passes a URL that the API can't reach, the API returns an error message, but the client library doesn't
throwthe error rather returns it as part of the response.Call request:
response = client.text_detection(image=image)If you examine the response object from the api you'll find this:
Seems like we should throw this error.
Related PR that I discovered this in: GoogleCloudPlatform/python-docs-samples#2569