Catch errors in 'fetch_video' fibers

This commit is contained in:
Omar Roth 2018-07-22 11:17:29 -05:00
parent 3beac53c89
commit 09cd7bcc66
2 changed files with 5 additions and 5 deletions

View file

@ -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"