Skip to content

Throw exception when getPredictionsForImage receives a malformed URI #32

@kueda

Description

@kueda

As far as I can tell, iOS will throw an exception when this method receives a path like /foo/bar but behaves normally when it receives file:///foo/bar because [VNImageRequestHandler initWithURL] isn't receiving a URL, so it completes requests with blank results. IMO,

  • This library's JS layer should validate the format of the uri "option" (it's not really optional) to ensure it's a string that both the iOS and Android implementations can process. If the uri is not valid, it should throw an informative error
  • IDK if there are other ways these classification requests can complete with blank results, but we might want to error out sooner in the iOS implementation if that happens with something more informative than saying a node has no score, b/c really there are no nodes at all in the response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions