diff --git a/lib/music_library_web/live/artist_live/show.ex b/lib/music_library_web/live/artist_live/show.ex index e3fa215b..7c6b0939 100644 --- a/lib/music_library_web/live/artist_live/show.ex +++ b/lib/music_library_web/live/artist_live/show.ex @@ -176,7 +176,12 @@ defmodule MusicLibraryWeb.ArtistLive.Show do |> put_flash(:info, gettext("Record added to the collection"))} {:error, %Ecto.Changeset{} = changeset} -> - {:noreply, assign(socket, form: to_form(changeset))} + {:noreply, + socket + |> put_flash( + :error, + gettext("Error importing record") <> "," <> inspect(changeset.errors) + )} end end diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index dfc7e1f5..08588846 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -47,6 +47,7 @@ msgstr "" msgid "Edit" msgstr "" +#: lib/music_library_web/live/artist_live/show.ex #: lib/music_library_web/live/collection_live/index.ex #, elixir-autogen, elixir-format msgid "Error importing record" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index f7c10f53..b2369ed7 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -47,6 +47,7 @@ msgstr "" msgid "Edit" msgstr "" +#: lib/music_library_web/live/artist_live/show.ex #: lib/music_library_web/live/collection_live/index.ex #, elixir-autogen, elixir-format msgid "Error importing record"