"Module or function to apply is not an atom in 'email'" error when using phx.gen.auth

Hi,

I’ve been using phx.gen.auth for user registration for some time now in this project and suddenly I started getting this strange error

Module or function to apply is not an atom in ‘email’

from ElixirLS Dialyzer in

user_settings_controller.ex file

def update_email(conn, %{“current_password” => password, “user” => user_params}) do
user = conn.assigns.current_user

case Accounts.apply_user_email(user, password, user_params) do
  {:ok, applied_user} ->
    Accounts.deliver_update_email_instructions(
      applied_user,
      user.email,
      &Routes.user_settings_url(conn, :confirm_email, &1)
    )

    conn
    |> put_flash(
      :info,
      "A link to confirm your email change has been sent to the new address."
    )
    |> redirect(to: Routes.user_settings_path(conn, :edit))

  {:error, changeset} ->
    render(conn, "edit.html", email_changeset: changeset, user: user, page_title: "Settings", layout: {LayoutView, "account.html"})
end

end

Only thing I’ve changed in this function from the original created by phx.gen.auth is the case error statement.

Does anyone have any idea how to fix this?