hotfix: Do not raise on 4XX status codes when connecting a provider

This commit is contained in:
Andrew Dryga
2024-04-02 13:14:06 -06:00
parent 33fdbd960c
commit 8f4e6a2540

View File

@@ -273,12 +273,18 @@ defmodule Domain.Auth.Adapters.OpenIDConnect do
{:error, {:invalid_jwt, _reason}} ->
{:error, :invalid_token}
{:error, {400, _reason}} ->
{:error, {status, _reason} = other} when status in 400..499 ->
Logger.info("Failed to connect OpenID Connect provider",
provider_id: provider.id,
reason: inspect(other)
)
{:error, :invalid_token}
{:error, other} ->
Logger.error("Failed to connect OpenID Connect provider",
provider_id: provider.id,
account_id: provider.account_id,
reason: inspect(other)
)