Hello and Welcome !
Ecto.Multi can return two different tuple:
{:ok, %{relationship: %{}, update: %{}}}where the second argument is a map of each part of your Multi, named after what name you gave them (so:relationshipand:update).{:error, :relationship, "not found", %{}}where the second argument is the Multi call who failed (in your case:relationship), the second would be the failed value and the last one would contain the changes that have been successfully done before the failed attempt (but reverted by the transaction if it was a database call), so empty in your case since it’s the first call that failed. That allow you to know exactly where it failed.
It’s specified in two places that i know of in the documentation:
The Repo.transaction() function → Ecto.Repo — Ecto v3.14.0
Examples on the Multi doc → Ecto.Multi — Ecto v3.14.0






















