diff options
author | rinpatch <rinpatch@sdf.org> | 2020-09-17 19:09:10 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-09-17 19:09:10 +0000 |
commit | a0f5e8b27edbe2224d9c2c3997ad5b8ea484244b (patch) | |
tree | 4a7a0f02e5880b7dff3ac20eaf59d71c7b584e5e /lib/pleroma/web/rich_media/parser.ex | |
parent | 425324aae3d4534bc045466a1cc15653ddfa27d2 (diff) | |
parent | 34afc2b0745b39861d9381e69cdb4b9c158f86ee (diff) | |
download | pleroma-2.1.2.tar.gz |
Merge branch 'release/2.1.2' into 'stable'v2.1.2
Release/2.1.2
See merge request pleroma/secteam/pleroma!17
Diffstat (limited to 'lib/pleroma/web/rich_media/parser.ex')
-rw-r--r-- | lib/pleroma/web/rich_media/parser.ex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/pleroma/web/rich_media/parser.ex b/lib/pleroma/web/rich_media/parser.ex index e98c743ca..569249f51 100644 --- a/lib/pleroma/web/rich_media/parser.ex +++ b/lib/pleroma/web/rich_media/parser.ex @@ -31,6 +31,14 @@ defmodule Pleroma.Web.RichMedia.Parser do {:ok, _data} = res -> res + {:error, :body_too_large} = e -> + e + + {:error, {:content_type, _}} = e -> + e + + # The TTL is not set for the errors above, since they are unlikely to change + # with time {:error, _} = e -> ttl = Pleroma.Config.get([:rich_media, :failure_backoff], 60_000) Cachex.expire(:rich_media_cache, url, ttl) |