Better error when using Mogrify

Hardcoding that the command isn't available is wrong. We check it on startup.
This commit is contained in:
Mark Felder 2021-02-15 15:28:58 -06:00
parent 390b4471f2
commit c6480eaf24
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ defmodule Pleroma.Upload.Filter.HeifToJpeg do
{:ok, :filtered, %Upload{upload | name: name, path: path, content_type: "image/jpeg"}}
rescue
e in ErlangError ->
{:error, "mogrify error: #{inspect(e)}"}
{:error, "#{__MODULE__}: #{inspect(e)}"}
end
end

View File

@ -45,7 +45,7 @@ defmodule Pleroma.Upload.Filter.Mogrifun do
{:ok, :filtered}
rescue
_e in ErlangError ->
{:error, "mogrify command not found"}
{:error, "#{__MODULE__}: #{inspect(e)}"}
end
end

View File

@ -15,7 +15,7 @@ defmodule Pleroma.Upload.Filter.Mogrify do
{:ok, :filtered}
rescue
_e in ErlangError ->
{:error, "mogrify command not found"}
{:error, "#{__MODULE__}: #{inspect(e)}"}
end
end