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

Add error handling #65

Merged
merged 2 commits into from
Oct 6, 2015
Merged

Add error handling #65

merged 2 commits into from
Oct 6, 2015

Conversation

phillbaker
Copy link
Contributor

This handles non 200-299 responses by all resources with specific errors, where necessary and default handlers.

Addresses #59 and the rest of #1.

cc @nanzhong

@route
Copy link

route commented Sep 29, 2015

Any updates on this? It was confusing when response was "{\"id\":\"unauthorized\",\"message\":\"Unable to authenticate you.\"}" but it showed TypeError: no implicit conversion of String into Array

@@ -64,7 +64,7 @@ def retrieve(page, per_page = self.per_page)
invoker = ResourceKit::ActionInvoker.new(action, resource, *@args)
invoker.options[:per_page] ||= per_page
invoker.options[:page] = page

# require 'pry'; binding.pry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra debug comment leftover?

@nanzhong
Copy link
Contributor

nanzhong commented Oct 2, 2015

👍, just a couple of small comments.

This handles non 200-299 responses by all resources with specific errors, where necessayr and default handlers.
@nanzhong
Copy link
Contributor

nanzhong commented Oct 6, 2015

🚢

phillbaker added a commit that referenced this pull request Oct 6, 2015
@phillbaker phillbaker merged commit 5d50aa9 into master Oct 6, 2015
@phillbaker phillbaker deleted the feature/errors branch October 6, 2015 14:16
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.

3 participants