We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c315710 commit 8633092Copy full SHA for 8633092
lib/slack/web/faraday/response/raise_error.rb
@@ -20,15 +20,17 @@ def response_content_type_is_a_string?(env)
20
21
def should_return?(env)
22
body = env.body
23
- (env.success? && body.is_a?(String) && response_content_type_is_a_string?(env)) || !body || body['ok']
+ return true unless env.success?
24
+ return true if env.success? && body.is_a?(String) && response_content_type_is_a_string?(env)
25
+ return true if !body || body['ok']
26
+
27
+ false
28
end
29
30
def on_complete(env)
31
throw_if_too_many_requests(env)
32
throw_if_response_is_invalid_json(env)
33
- return unless env.success?
-
34
35
return if should_return?(env)
36
0 commit comments