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

Tinplate::Error.from_response doesn't seem to work #18

Closed
dvandersluis opened this issue Mar 29, 2022 · 0 comments · Fixed by #19
Closed

Tinplate::Error.from_response doesn't seem to work #18

dvandersluis opened this issue Mar 29, 2022 · 0 comments · Fixed by #19

Comments

@dvandersluis
Copy link
Contributor

It looks like from_response is expecting a different API reponse than tineye is giving now.

For example, here is the JSON from some errors I am encountering:

{"code"=>400, "messages"=>["Image too simple or too small to create unique signature"], "stats"=>{}, "results"=>[]}
{"code"=>401, "messages"=>["Please provide a valid API key."], "stats"=>{}, "results"=>[]}

Tinplate::Error.from_response looks like it's expecting the messages array to contain a type but it does not, which means all errors are being turned into a generic Tinplate::Error with no message.

Also there's some errors that are not handled even if this was working: https://help.tineye.com/article/181-list-of-tineye-api-error-messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant