-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Slack 500 page error handling #306
Comments
Yes, indeed. On a 500 we should be reporting something other than a parsing error. Please contribute? |
@dblock I've been looking into where in the stack/middleware to implement a rescue/raise for this, and so far the most straightforward solution is in Slack::Web::Faraday::Request.request. Do you agree with this approach? |
Usually these things are handled by middleware, eg. https://github.com/slack-ruby/slack-ruby-client/blob/master/lib/slack/web/faraday/response/raise_error.rb Start by writing a test and solving the problem in any way you can. We can improve upon it. |
I had been thinking along those lines as well, but it has been challenging to grok the order of middleware execution. So, in this PR I built a test and explored a non- |
Implemented in #350 |
Hi! In the process of interacting with Slack's API, it sometimes has the occasion to return an html 500 status page which then causes a
Faraday::ParsingError
with something likeSince the gem is speccing out its own error namespace, it feels like it'd be more consistent to handle and re-raise something in the
Slack::Web::Api::Error
domain instead. Thanks!The text was updated successfully, but these errors were encountered: