Commit 47fa6ba1f66f515dacbc25c80e2375123bbdc199

Thomas de Grivel 2022-04-08T09:12:31

inspect errors

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/lib/kmxgit_web/router.ex b/lib/kmxgit_web/router.ex
index 3cdb313..333603a 100644
--- a/lib/kmxgit_web/router.ex
+++ b/lib/kmxgit_web/router.ex
@@ -168,7 +168,11 @@ end
   if Mix.env() != :dev do
     use Plug.ErrorHandler
     @impl Plug.ErrorHandler
+    def handle_errors(conn, params = %{reason: Elixir.Plug.CSRFProtection.InvalidCSRFTokenError}) do
+      send_resp(conn, conn.status, "Error !")
+    end
     def handle_errors(conn, params) do
+      IO.inspect(params)
       Discord.error(conn, params)
       send_resp(conn, conn.status, "Error ! We have been notified, please retry later.")
     end