API: handle related channels parsing exceptions

pull/2868/head
Samantaz Fox 3 years ago
parent 1668e4187e
commit 698a6f3886
No known key found for this signature in database
GPG Key ID: F42821059186176E

@ -97,7 +97,11 @@ module Invidious::Routes::API::V1::Channels
json.field "relatedChannels" do
json.array do
# Fetch related channels
related_channels = fetch_related_channels(channel)
begin
related_channels = fetch_related_channels(channel)
rescue ex
related_channels = [] of AboutRelatedChannel
end
related_channels.each do |related_channel|
json.object do

Loading…
Cancel
Save