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

Improve IQDB error handling #3612

Merged
merged 4 commits into from
Apr 9, 2018
Merged

Conversation

evazion
Copy link
Member

@evazion evazion commented Apr 7, 2018

Related to #3605. Adds better error handling when iqdb lookups fail:

  • Raise an error instead of returning no matches when iqdbs returns an error response.
  • Include the api response returned by iqdbs in error messages.
  • Display an error message when the Find similar link in the sidebar fails.
  • Simplify the show / check actions in the controller (unrelated code cleanup).

* Combine create_by_post + create_by_url. Rename to find_similar.
* Move iqdb enabled check to find_similar.
Raise errors immediately to avoid deeply nested if-else statements.
* Raise an error on iqdb errors instead of returning no matches.
* Include the iqdb api response in the error response.
Make `link_to ..., remote: true` ajax requests display an error notice on failure.
@r888888888 r888888888 merged commit 5f33238 into danbooru:master Apr 9, 2018
@evazion evazion deleted the fix-iqdb-errors branch April 14, 2018 03:18
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 this pull request may close these issues.

None yet

2 participants