Skip to content

Commit

Permalink
log all customer support errors when rendering so we know what they a…
Browse files Browse the repository at this point in the history
…re (#2101)
  • Loading branch information
anthonyshull authored Jun 18, 2024
1 parent 29a90a8 commit cb16b84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dotcom_web/controllers/customer_support_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ defmodule DotcomWeb.CustomerSupportController do
defp simple_filename(name), do: String.replace(name, ~r/(\s)+/, "-")

defp render_form(conn, %{errors: errors, comments: comments}) do
Logger.warning("#{__MODULE__} form validation failed: #{inspect(errors)}")

render(
conn,
"index.html",
Expand All @@ -222,6 +224,8 @@ defmodule DotcomWeb.CustomerSupportController do
end

defp render_form(conn, %{errors: errors}) do
Logger.warning("#{__MODULE__} form validation failed: #{inspect(errors)}")

render(
conn,
"index.html",
Expand Down

0 comments on commit cb16b84

Please sign in to comment.