Commit 49013485c5f2fb386c891db73af007bfd1594edd

Thomas de Grivel 2022-02-03T12:17:34

fix

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/discord.ex b/lib/discord.ex
index 3d6aa1f..04e65d6 100644
--- a/lib/discord.ex
+++ b/lib/discord.ex
@@ -2,7 +2,7 @@ defmodule Discord do
 
   def error(params) do
     url = Application.get_env(:kmxgit, :discord_errors_webhook)
-    reason = if (params.reason.message rescue nil) do
+    reason = if (try do params.reason.message rescue _ -> nil end) do
       type = params.reason.__struct__
       "#{type}: #{params.reason.message}"
     else