mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
API: handle related channels parsing exceptions
This commit is contained in:
parent
1668e4187e
commit
698a6f3886
1 changed files with 5 additions and 1 deletions
|
@ -97,7 +97,11 @@ module Invidious::Routes::API::V1::Channels
|
|||
json.field "relatedChannels" do
|
||||
json.array do
|
||||
# Fetch related channels
|
||||
begin
|
||||
related_channels = fetch_related_channels(channel)
|
||||
rescue ex
|
||||
related_channels = [] of AboutRelatedChannel
|
||||
end
|
||||
|
||||
related_channels.each do |related_channel|
|
||||
json.object do
|
||||
|
|
Loading…
Reference in a new issue