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

Requests : handle invalid "successful" responses #62

Merged
merged 2 commits into from
May 31, 2020
Merged

Requests : handle invalid "successful" responses #62

merged 2 commits into from
May 31, 2020

Commits on May 19, 2020

  1. API Request : Catch bad http responses

    Reject promise if status code is >= 400, or if no 'ads' entry in the JSON result.
    
    This way it fails nicely instead of a `TypeError: Cannot read property 'ads' of undefined`
    nicolsc committed May 19, 2020
    Configuration menu
    Copy the full SHA
    e034f90 View commit details
    Browse the repository at this point in the history
  2. Search error : use Error for consistency

    previous commit was using String, while the default error rejection is using an Error
    nicolsc committed May 19, 2020
    Configuration menu
    Copy the full SHA
    1b0e9ec View commit details
    Browse the repository at this point in the history