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 HTTP error handling #1

Merged
merged 1 commit into from
Sep 28, 2015
Merged

Improve HTTP error handling #1

merged 1 commit into from
Sep 28, 2015

Conversation

fson
Copy link
Member

@fson fson commented Sep 28, 2015

  • Throw an APIError when non-OK response returned.
  • Parse JSON response bodies in the library.
  • Lookup error message from the JSON.

- Throw an APIError when non-OK response returned.
- Parse JSON response bodies in the library.
- Lookup error message from the JSON.
fson added a commit to reindexio/reindex-cli that referenced this pull request Sep 28, 2015
Catch HTTP errors in all commands.

Depends on reindexio/reindex-js#1,
which moves JSON parsing to the library and adds better errors.
@freiksenet
Copy link
Contributor

:shipit: Don't forget the npm release.

fson added a commit that referenced this pull request Sep 28, 2015
Improve HTTP error handling
@fson fson merged commit 96b877e into master Sep 28, 2015
@fson fson deleted the errors branch September 28, 2015 18: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.

2 participants