mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-24 14:37:19 +00:00
fix Shadowing outer local variable response
This commit is contained in:
parent
73c84baf9f
commit
1954463371
@ -648,11 +648,11 @@ module YoutubeAPI
|
||||
puts "invidious companion section"
|
||||
puts invidious_companion_urls[Random.rand(invidious_companion_urls.size)]
|
||||
begin
|
||||
response = make_client(URI.parse(invidious_companion_urls[Random.rand(invidious_companion_urls.size)]),
|
||||
invidious_companion_response = make_client(URI.parse(invidious_companion_urls[Random.rand(invidious_companion_urls.size)]),
|
||||
&.post(endpoint, headers: headers, body: data.to_json))
|
||||
body = response.body
|
||||
if (response.status_code != 200)
|
||||
raise Exception.new("status code: " + response.status_code.to_s + " and body: " + body)
|
||||
body = invidious_companion_response.body
|
||||
if (invidious_companion_response.status_code != 200)
|
||||
raise Exception.new("status code: " + invidious_companion_response.status_code.to_s + " and body: " + body)
|
||||
end
|
||||
rescue ex
|
||||
raise InfoException.new("Error while communicating with Invidious companion: " + (ex.message || "no extra info found"))
|
||||
|
Loading…
Reference in New Issue
Block a user