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

Add Regexps array of ignored error strings #6

Merged
merged 12 commits into from Feb 7, 2019

Conversation

Projects
None yet
1 participant
@epistrephein
Copy link
Owner

epistrephein commented Feb 6, 2019

Pull Request description

Add an array of Regexps for the errors strings returned by the endpoint that can be treated as no results.

This fixes an unintended behavior where the endpoint will return an error string (e.g. Cant find imdb in database. Are you sure this imdb exists?) when searching for a imdb, themoviedb or tvdb id that might not exist.
With this change, the request would just return an empty array.

Pull Request checklist

  • My code is a bug fix (non-breaking change which fixes an issue)
  • My code is a new feature (non-breaking change which adds functionality)
  • My code introduces a breaking change (fix or feature that would cause existing functionality to change)
  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@epistrephein epistrephein self-assigned this Feb 6, 2019

Show resolved Hide resolved lib/rarbg/api.rb Outdated

@epistrephein epistrephein force-pushed the feature/ignored-errors-regexps branch from 7b7f96b to ff338c0 Feb 6, 2019

epistrephein added some commits Feb 6, 2019

@epistrephein epistrephein merged commit ec08d18 into master Feb 7, 2019

2 checks passed

Hound No violations found. Woof!
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@epistrephein epistrephein deleted the feature/ignored-errors-regexps branch Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment