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 19d502dCopy full SHA for 19d502d
lib/slack/web/faraday/response/raise_error.rb
@@ -20,15 +20,16 @@ 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 if !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
+ return false
27
end
28
29
def on_complete(env)
30
throw_if_too_many_requests(env)
31
throw_if_response_is_invalid_json(env)
32
- return unless env.success?
-
33
34
return if should_return?(env)
35
0 commit comments