Group classes in media proxy rescue_from declaration (#37304)

This commit is contained in:
Matt Jankowski 2026-01-28 05:52:31 -05:00 committed by GitHub
parent 6a995decb8
commit c1626486bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,9 +11,7 @@ class MediaProxyController < ApplicationController
before_action :authenticate_user!, if: :limited_federation_mode?
before_action :set_media_attachment
rescue_from ActiveRecord::RecordInvalid, with: :not_found
rescue_from Mastodon::UnexpectedResponseError, with: :not_found
rescue_from Mastodon::NotPermittedError, with: :not_found
rescue_from ActiveRecord::RecordInvalid, Mastodon::NotPermittedError, Mastodon::UnexpectedResponseError, with: :not_found
rescue_from(*Mastodon::HTTP_CONNECTION_ERRORS, with: :internal_server_error)
def show