Skip to content

Commit bddbb87

Browse files
committed
Array#include? != String#include?
1 parent 66bce69 commit bddbb87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pardot/http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def check_response(http_response)
6060
error ||= "Unknown Failure: #{rsp.inspect}" if rsp && rsp['stat'] == 'fail'
6161
content = error['__content__'] if error.is_a?(Hash)
6262

63-
if [error, content].include?('access_token is invalid') && using_salesforce_access_token?
63+
if [error, content].grep(/access_token is invalid/).any? && using_salesforce_access_token?
6464
raise AccessTokenExpiredError,
6565
'Access token is invalid. Use Salesforce OAuth to refresh the existing Salesforce access token or to retrieve a new token. See https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/oauth_refresh_token_flow.htm for more information.'
6666
end

0 commit comments

Comments
 (0)