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

Inherit Slack::Web::Api::Error from Faraday::ClientError #22

Closed
technicalpickles opened this issue Nov 10, 2015 · 2 comments
Closed

Inherit Slack::Web::Api::Error from Faraday::ClientError #22

technicalpickles opened this issue Nov 10, 2015 · 2 comments

Comments

@technicalpickles
Copy link

Currently, it inherits from Faraday::Error. The problem with this is that this doesn't have access to the response that caused the error. If this was [Faraday::ClientError](https://github.com/lostisland/faraday/blob/master/lib/faraday/error.rb#L5) instead, you can catch and access the response object.

@technicalpickles technicalpickles changed the title Inheritet Slack::Web::Api::Error from Faraday::ClientError Inherit Slack::Web::Api::Error from Faraday::ClientError Nov 10, 2015
@dblock
Copy link
Collaborator

dblock commented Nov 11, 2015

Makes sense, I'd take a PR for that.

@dblock
Copy link
Collaborator

dblock commented Nov 30, 2015

Turned out a little too complicated to change the inheritance, ClientError tries to do too many smart things. Ended up exposing response as is, see dblock@636f6c1.

@dblock dblock reopened this Nov 30, 2015
@dblock dblock closed this as completed Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants