diff --git a/lib/kmxgit_web/router.ex b/lib/kmxgit_web/router.ex
index 333603a..3fdbcf1 100644
--- a/lib/kmxgit_web/router.ex
+++ b/lib/kmxgit_web/router.ex
@@ -168,7 +168,7 @@ end
if Mix.env() != :dev do
use Plug.ErrorHandler
@impl Plug.ErrorHandler
- def handle_errors(conn, params = %{reason: Elixir.Plug.CSRFProtection.InvalidCSRFTokenError}) do
+ def handle_errors(conn, %{kind: :error, reason: %Elixir.Plug.CSRFProtection.InvalidCSRFTokenError{}}) do
send_resp(conn, conn.status, "Error !")
end
def handle_errors(conn, params) do