Show a proper error. A failure doesn't always mean the command isn't available, and...
[akkoma] / lib / pleroma / upload / filter / exiftool.ex
index 1fd0cfdaa7204e7dd3096f6e3604d0a8895e16ce..a03b32ae4357cb2345d99344dc055538a12c628f 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Upload.Filter.Exiftool do
@@ -21,8 +21,8 @@ defmodule Pleroma.Upload.Filter.Exiftool do
         {error, 1} -> {:error, error}
       end
     rescue
-      _e in ErlangError ->
-        {:error, "exiftool command not found"}
+      e in ErlangError ->
+        {:error, "#{__MODULE__}: #{inspect(e)}"}
     end
   end