FIX: if favicon is missing due to bad url we would return a 500 on favicons

This ensures that the error logging does not corrupt the cache
This commit is contained in:
Sam Saffron 2019-06-05 16:43:40 +10:00
parent 62141b6316
commit b9df7a2257
1 changed files with 1 additions and 0 deletions

View File

@ -143,6 +143,7 @@ class StaticController < ApplicationController
rescue => e
AdminDashboardData.add_problem_message('dashboard.bad_favicon_url', 1800)
Rails.logger.warn("Failed to fetch faivcon #{favicon.url}: #{e}\n#{e.backtrace}")
""
ensure
file&.unlink
end