Add 404 status code on all possible endpoints

This commit is contained in:
Émilien Devos
2022-05-27 13:36:13 +00:00
committed by GitHub
parent c2d91c9544
commit c201ea53ba
16 changed files with 80 additions and 11 deletions

View File

@@ -1159,7 +1159,11 @@ def fetch_video(id, region)
end
if reason = info["reason"]?
raise InfoException.new(reason.as_s || "")
if reason == "Video unavailable"
raise NotFoundException.new(reason.as_s || "")
else
raise InfoException.new(reason.as_s || "")
end
end
video = Video.new({