fix: Issue when Instagram response body is empty

Fixes #3138
This commit is contained in:
Tejaswini Chile 2021-10-07 14:36:54 +05:30 committed by GitHub
parent c54aae21ff
commit 700721ea6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,9 +62,8 @@ class Instagram::SendOnInstagramService < Base::SendOnChannelService
body: message_content,
query: query
)
# response = HTTParty.post(url, options)
Rails.logger.info("Instagram response: #{response} : #{message_content}") if response[:body][:error]
Rails.logger.info("Instagram response: #{response} : #{message_content}") if response[:body]
response[:body]
end