Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exception when getPredictionsForImage receives a malformed URI #32

Open
2 tasks
kueda opened this issue Jun 29, 2024 · 0 comments
Open
2 tasks

Throw exception when getPredictionsForImage receives a malformed URI #32

kueda opened this issue Jun 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kueda
Copy link
Member

kueda commented Jun 29, 2024

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
@kueda kueda added the enhancement New feature or request label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant