8000 Vision API Error isn't thrown · Issue #3 · googleapis/python-vision · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
Vision API Error isn't thrown #3
@nnegrey

Description

@nnegrey

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.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0