Skip to content

Commit

Permalink
[infra] log requests errors
Browse files Browse the repository at this point in the history
  • Loading branch information
patatoid committed Oct 12, 2024
1 parent aa4e044 commit cebb51e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/boruta_identity/lib/boruta_identity_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defmodule BorutaIdentityWeb.Router do
redirect_if_user_is_authenticated: 2,
require_authenticated_user: 2
]
require Logger

alias BorutaIdentity.Configuration
alias BorutaIdentity.Configuration.ErrorTemplate
Expand Down Expand Up @@ -102,6 +103,7 @@ defmodule BorutaIdentityWeb.Router do
end

defp render_error(conn, reason) do
Logger.error("conn: #{inspect(conn)} reason: #{inspect(reason)}")
%ErrorTemplate{content: template} = Configuration.get_error_template!(conn.status)

context = %{
Expand Down

0 comments on commit cebb51e

Please sign in to comment.