Skip to content

Commit

Permalink
chore: credo
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Feb 5, 2025
1 parent de69b8f commit bbb043f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/ash_authentication_phoenix_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ defmodule AshAuthentication.Phoenix.Web do
end
end

defmacro _transform_errors() do
defmacro _transform_errors do
quote do
alias AshPhoenix.FormData.Error

fn _source, error ->
if AshPhoenix.FormData.Error.impl_for(error) do
AshPhoenix.FormData.Error.to_form_error(error)
if Error.impl_for(error) do
Error.to_form_error(error)
|> List.wrap()
# credo:disable-for-next-line Credo.Check.Refactor.Nesting
|> Enum.map(fn {field, message, vars} ->
{field, _gettext(message, vars), vars}
end)
Expand Down

0 comments on commit bbb043f

Please sign in to comment.