From 0f08cc5aa9c6fe2c9810872b375354a9d6549347 Mon Sep 17 00:00:00 2001 From: saltycrys <73420320+saltycrys@users.noreply.github.com> Date: Mon, 30 Nov 2020 12:57:25 +0100 Subject: [PATCH] Remove backtrace on YouTube error YouTube returning an error is not a bug in Invidious, so it should not print a backtrace. --- src/invidious/videos.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 20048460..8b20c181 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -998,7 +998,7 @@ def fetch_video(id, region) }.try { |a| JSON::Any.new(a) } || JSON::Any.new([] of JSON::Any) end - raise info["reason"]?.try &.as_s || "" if !info["videoDetails"]? + raise InfoException.new(info["reason"]?.try &.as_s || "") if !info["videoDetails"]? video = Video.new({ id: id,