Skip to content

return empty result instead of hard-to-understand internal error if imagePaths is of length 0 #4

@czeildi

Description

@czeildi

If there is no images to annotate and also no saved annotations, function returns error

googleCloudVisionR::gcv_get_image_annotations(character(0))
#> Error in googleCloudVisionR::gcv_get_image_annotations(character(0)): object 'imageAnnotations' not found

Created on 2019-08-23 by the reprex package (v0.3.0.9000)

It might make sense to return a data table with 0 rows (but the same columns you would get otherwise) so that it is easier in a loop. If that is not preferred for some reason I'd welcome a more specific error

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions