Invidious is an alternative front-end to YouTube
API: handle related channels parsing exceptions
Samantaz Fox698a6f38863c
diff --git a/src/invidious/routes/api/v1/channels.cr b/src/invidious/routes/api/v1/channels.crindex 83c6db04..c4d6643a 100644--- a/src/invidious/routes/api/v1/channels.cr+++ b/src/invidious/routes/api/v1/channels.cr@@ -97,7 +97,11 @@ module Invidious::Routes::API::V1::Channelsjson.field "relatedChannels" dojson.array do# Fetch related channels- related_channels = fetch_related_channels(channel)+ begin+ related_channels = fetch_related_channels(channel)+ rescue ex+ related_channels = [] of AboutRelatedChannel+ endrelated_channels.each do |related_channel|json.object do