-
-
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
NoMethodError in replaced raise_error method for Faraday::Response::RaiseError #32
Comments
Should handle slack-ruby#32
What is |
Don't know. Slack seems to be having intermittent issues, so maybe related (but also makes it difficult to capture/recreate). It could also be related to message throttles. Slack can return a 429 which might not have the full JSON response. |
In this case the library should have raised an exception (the default faraday block says so, but maybe we're not handing that error code?). Either way I don't just want to throw in "protection" for a scenario we don't understand :) |
It does look like Faraday's own raise_error middleware should be handling anything between 400..600. Is it possible this is overwriting the mapping somehow? |
I don't think so, but having a recorded VCR session or a test would make things easy. Can you repro this? |
Unable to now. It looks like Slack is back to normal and I'm unable to recreate it. But it was happening for about four hours. Weird. |
Slack had an outage, but I don't know what form it took :( |
Fixed in dblock@25bef46. The problem was the wrong order of Faraday middleware. It should have caught the 429 error first before processing the body at all. |
👍 |
Version bump to 0.4.1? |
@contentfree Still finalizing https://github.com/dblock/slack-ruby-client/pull/29 and want to make sure we don't release something broken that needs to be changed next again. |
Stacktrace:
A guard needs to be added to handle the case when
body
isn't presentThe text was updated successfully, but these errors were encountered: