Commit 0c2cdd22348486a177c2e8c9fb99e42c3e5c5b79

Thomas de Grivel 2022-02-03T12:15:05

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 0af48cb..3d6aa1f 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] do
+    reason = if (params.reason.message rescue nil) do
       type = params.reason.__struct__
       "#{type}: #{params.reason.message}"
     else