]> cat aescling's git repositories - mastodon.git/commitdiff
Fix uncaught errors in media proxy controller (#11811)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 11 Sep 2019 23:51:12 +0000 (01:51 +0200)
committerGitHub <noreply@github.com>
Wed, 11 Sep 2019 23:51:12 +0000 (01:51 +0200)
app/controllers/media_proxy_controller.rb

index 558cd6e301f348720c9d1701fce184d1f3ef88a1..47544f21c9671fdb1d4228a9b34ec774b746224e 100644 (file)
@@ -8,6 +8,8 @@ class MediaProxyController < ApplicationController
   before_action :authenticate_user!, if: :whitelist_mode?
 
   rescue_from ActiveRecord::RecordInvalid, with: :not_found
+  rescue_from Mastodon::UnexpectedResponseError, with: :not_found
+  rescue_from HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, with: :internal_server_error
 
   def show
     RedisLock.acquire(lock_options) do |lock|