This repository was archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
Vision API Error isn't thrown #3
Copy link
Copy link
Closed
Labels
api: visionIssues related to the googleapis/python-vision API.Issues related to the googleapis/python-vision API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
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
Metadata
Metadata
Assignees
Labels
api: visionIssues related to the googleapis/python-vision API.Issues related to the googleapis/python-vision API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.