From a8b0bb355d3e7351b9f3d53fe7a3fb6d3d011d33 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 18 Aug 2019 18:04:18 +0200 Subject: Fix uncaught 422 and 500 errors (#11590) --- app/controllers/media_proxy_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/media_proxy_controller.rb') diff --git a/app/controllers/media_proxy_controller.rb b/app/controllers/media_proxy_controller.rb index 8da6c6fe0..558cd6e30 100644 --- a/app/controllers/media_proxy_controller.rb +++ b/app/controllers/media_proxy_controller.rb @@ -7,6 +7,8 @@ class MediaProxyController < ApplicationController before_action :authenticate_user!, if: :whitelist_mode? + rescue_from ActiveRecord::RecordInvalid, with: :not_found + def show RedisLock.acquire(lock_options) do |lock| if lock.acquired? -- cgit