Merge branch 'issue/2089' into 'develop'
[akkoma] / lib / pleroma / web / rich_media / parser.ex
index 5727fda189bf39f4ac501461504ff247f1f86fa7..33f6f1fa1bba2aab9ce02476af39499747066c92 100644 (file)
@@ -36,6 +36,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)