Skip to content

Commit

Permalink
Fix uncaught errors in media proxy controller (mastodon#11811)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent 7f3f583 commit 7a387aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/media_proxy_controller.rb
Expand Up @@ -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|
Expand Down

0 comments on commit 7a387aa

Please sign in to comment.