Skip to content

Commit

Permalink
Hopefully catch spurious error where just "false" is returned.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Oct 26, 2018
1 parent 73e7955 commit 29b6fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@
response = Instagram.get("/#{username}/", options, tokens)
return "Instagram username does not exist. If the user changed their username, go here to find the new username: https://www.instagram.com/graphql/query/?query_id=17880160963012870&id=#{@user_id}&first=1" if response.code == 404
return "The sessionid expired!" if params[:sessionid] && response.code == 302
raise(InstagramError, response) if !response.success?
raise(InstagramError, response) if !response.success? || !response.json

@data = response.json["graphql"]["user"]
@user = @data["username"] rescue CGI.unescape(username)
Expand Down

0 comments on commit 29b6fdf

Please sign in to comment.