Programming Phoenix LiveView: Repo.insert!() vs Repo.insert() (page 77) B7

Hi again! At the bottom of the code snippet that begins at the top of page 77:

iex> Repo.insert!(changeset)
{:ok, %Product{...}}

shows that Repo.insert!(changeset) returns a {:ok, %Product{...}} tuple whereas it would actually return a %Product{...} struct or raise.

Repo.insert() (no !) would be the function that returns the tuple.


Correct you are! Will fix in the next release.