Skip to content

Commit 698a6f3

Browse files
committed
API: handle related channels parsing exceptions
1 parent 1668e41 commit 698a6f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/invidious/routes/api/v1/channels.cr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ module Invidious::Routes::API::V1::Channels
9797
json.field "relatedChannels" do
9898
json.array do
9999
# Fetch related channels
100-
related_channels = fetch_related_channels(channel)
100+
begin
101+
related_channels = fetch_related_channels(channel)
102+
rescue ex
103+
related_channels = [] of AboutRelatedChannel
104+
end
101105

102106
related_channels.each do |related_channel|
103107
json.object do

0 commit comments

Comments
 (0)