Extract wrapper constant for HTTP::*
error classes (#32285)
This commit is contained in:
parent
f49161ab1d
commit
e8ec6667bd
21 changed files with 29 additions and 23 deletions
|
@ -13,7 +13,7 @@ class MediaProxyController < ApplicationController
|
|||
rescue_from ActiveRecord::RecordInvalid, with: :not_found
|
||||
rescue_from Mastodon::UnexpectedResponseError, with: :not_found
|
||||
rescue_from Mastodon::NotPermittedError, with: :not_found
|
||||
rescue_from HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, with: :internal_server_error
|
||||
rescue_from(*Mastodon::HTTP_CONNECTION_ERRORS, OpenSSL::SSL::SSLError, with: :internal_server_error)
|
||||
|
||||
def show
|
||||
with_redis_lock("media_download:#{params[:id]}") do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue