nickdichev

nickdichev

Well, glad to hear things are working.

Just as a reference, to start debugging a changeset problem you can look at the errors key, which correspond to which of your changeset validations failed. So for example, your changeset had:

errors: [name: {"can't be blank", [validation: :required]}]
0
Post #11
axelson

axelson

Scenic Core Team

If you’re trying to debug what’s happening you should use IO.inspect instead of IO.puts:

def call(conn, {:error, changeset}) do
  IO.inspect(changeset, label: "changeset")
  IO.inspect(conn, label: "conn")
end

More info at:

1
Post #12
JackMaarek

JackMaarek OP

I see this is very helpful.
Thanks for the ressource !

0
Post #13
— All posts loaded —