Skip to content

Commit

Permalink
FIX: raise error if no data available to Instagram engine (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrw committed Nov 20, 2020
1 parent ff5a2fb commit 317f6ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/onebox/engine/instagram_onebox.rb
Expand Up @@ -16,6 +16,8 @@ def clean_url

def data
oembed = get_oembed
raise "No oEmbed data found. Ensure 'facebook_app_access_token' is valid" if oembed.data.empty?

permalink = clean_url.gsub("/#{oembed.author_name}/", "/")

{ link: permalink,
Expand Down

0 comments on commit 317f6ee

Please sign in to comment.