mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-04 14:41:59 +00:00
Catch errors in 'fetch_video' fibers
This commit is contained in:
@@ -412,8 +412,7 @@ get "/captions/:id" do |env|
|
||||
begin
|
||||
video = get_video(id, client, PG_DB)
|
||||
rescue ex
|
||||
error_message = ex.message
|
||||
next templated "error"
|
||||
halt env, status_code: 403
|
||||
end
|
||||
|
||||
env.response.content_type = "application/json"
|
||||
|
||||
Reference in New Issue
Block a user