Merge pull request #3124 from iv-org/add-404-status-code

This commit is contained in:
Samantaz Fox
2022-07-06 22:05:01 +02:00
16 changed files with 80 additions and 11 deletions

View File

@@ -1158,7 +1158,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({