mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: Improve error handling for calculate_dominant_color!
(#18503)
These errors tend to indicate that the upload is missing on the remote store. This is bad, but we don't want it to block the dominant-color calculation process. This commit catches errors when there is an HTTP error, and fixes the `base_store.rb` implementation when `FileHelper.download` returns nil.
This commit is contained in:
@ -116,6 +116,8 @@ module FileStore
|
||||
follow_redirect: true
|
||||
)
|
||||
|
||||
return nil if file.nil?
|
||||
|
||||
cache_file(file, filename)
|
||||
file = get_from_cache(filename)
|
||||
end
|
||||
|
Reference in New Issue
Block a user