Fix handling invalid client reason (#828)

* Catch different reasons

* redirect
This commit is contained in:
Po Chen
2022-07-21 18:44:24 +10:00
committed by Jamil
parent b70b65a408
commit f86e080471

View File

@@ -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