diff --git a/apps/fz_http/lib/fz_http_web/controllers/auth_controller.ex b/apps/fz_http/lib/fz_http_web/controllers/auth_controller.ex index a8db0303e..54ba216fd 100644 --- a/apps/fz_http/lib/fz_http_web/controllers/auth_controller.ex +++ b/apps/fz_http/lib/fz_http_web/controllers/auth_controller.ex @@ -82,8 +82,11 @@ defmodule FzHttpWeb.AuthController do # Error verifying claims or fetching tokens {:error, action, reason} -> - Logger.warn("OpenIDConnect Error during #{action}: #{reason}") - send_resp(conn, 401, "") + Logger.warn("OpenIDConnect Error during #{action}: #{inspect(reason)}") + + conn + |> put_flash(:error, "Failed when performing this action: #{action}") + |> redirect(to: Routes.root_path(conn, :index)) end end